package cn.estsh.i3plus.pojo.aps.bean;

import cn.estsh.i3plus.pojo.aps.annotation.FieldAnnotation;
import cn.estsh.i3plus.pojo.aps.common.BaseAPS;
import cn.estsh.i3plus.pojo.base.enumutil.ApsEnumUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * @Description :加班日历
 * @Reference :
 * @Author : jason.niu
 * @CreateDate : 2019-09-17
 * @Modify:
 **/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "APS_OVERTIME_CALENDAR")
@Api("加班日历")
public class OvertimeCalendar extends BaseAPS {
    private static final long serialVersionUID = -501715721073189464L;
    @Column(name="RES_CODES")
    @ApiParam(value ="资源代码")
    @FieldAnnotation(editType = ApsEnumUtil.EDIT_TYPE.MULTI_OBJECT, typeName = "Resource", notEmpty = true)
    private String resCodes;

    @Column(name="START")
    @ApiParam(value ="开始时间")
    @FieldAnnotation(notEmpty = true)
    private Date start;

    @Column(name="END")
    @ApiParam(value ="结束时间")
    @FieldAnnotation(notEmpty = true)
    private Date end;

    @Column(name="TYPE")
    @ApiParam(value ="类型")
    @FieldAnnotation(defaultValue = "ENABLE")
    private ApsEnumUtil.CALENDAR_TYPE type;
}
