package cn.estsh.i3plus.ext.mes.pojo.bean;

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @PROJECT_NAME: i3plus-mes-panasonic-bu
 * @DESCRIPTION:
 * @USER: xinwang.yi
 * @DATE: 2023-04-13 16:30
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "MES_WORK_LICENSE_TRAVEL", indexes = {
        @Index(columnList = "WORK_LICENSE_CODE")
})
@Api("上岗证信息履历表")
public class MesWorkLicenseTravel extends BaseBean implements Serializable {

    private static final long serialVersionUID = -2035920163123951492L;

    @Column(name = "WORK_LICENSE_CODE")
    @ApiParam("上岗证编码")
    private String workLicenseCode;

    @Column(name = "USER_NAME")
    @ApiParam("姓名")
    private String userName;

    @Column(name = "VALIDITY_DATE")
    @ApiParam("上岗证有效期")
    private String validityDate;

    @Column(name = "REMARK")
    @ApiParam("备注")
    private String remark;

    @Column(name = "SYSTEM_SYNC_STATUS")
    @ColumnDefault("2")
    @ApiParam(value = "系统同步标志")
    public Integer systemSyncStatus = 2;

    @Transient
    @ApiParam("上岗证开始有效期")
    private String validityDateStart;

    @Transient
    @ApiParam("上岗证结束有效期")
    private String validityDateEnd;

    @Transient
    @ApiParam("启用/禁用状态")
    public String isValidStr;
}
