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

import cn.estsh.i3plus.pojo.mes.bean.MesWorkCenter;
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;

/**
 * @author wangjie
 * @version 1.0
 * @date 2021/1/12 15:58
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_WORK_CENTER_EXT",indexes = {
        @Index(columnList = "ORGANIZE_CODE_EXT"),
        @Index(columnList = "CREATE_DATE_TIME_EXT"),
        @Index(columnList = "MODIFY_DATE_TIME_EXT")
})
@PrimaryKeyJoinColumn(name = "PID")
@Api("工作中心表拓展")
public class MesWorkCenterExt extends MesWorkCenter implements Serializable {

    private static final long serialVersionUID = -4796063646500897365L;

    @Column(name = "SHIFT_CODE")
    @ApiParam("班次代码")
    private String shiftCode;

    @Column(name = "WORK_TIME")
    @ApiParam("作业时间")
    private String workTime;

    @Column(name = "WORKER_QTY", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("作业人数")
    private Double workerQty;

    @Column(name="AT_HOME_NUM", columnDefinition = "decimal(18,8)")
    @ApiParam(value = "在籍人数")
    @ColumnDefault("0")
    public Double atHomeNum;

    @Column(name = "LINE_TYPE")
    @ApiParam("产线分类")
    private String lineType;

    @Column(name = "NO_WORK_TARGET")
    @ApiParam("非作业停机目标")
    private String noWorkTarget;

    @Column(name = "IS_DONT")
    @ApiParam("系别")
    private String isDont;

    @Column(name = "DONT_CLASS")
    @ApiParam("班别")
    private String dontClass;

    @Column(name = "WORK_CENTER_DESC")
    @ApiParam("产线描述")
    private String workCenterDesc;

    @Column(name="ORGANIZE_CODE_EXT")
    @ApiParam(value ="组织代码")
    public String organizeCodeExt;

    @Column(name="IS_VALID_EXT")
    @ApiParam(value = "有效性")
    public Integer isValidExt;

    @Column(name="IS_DELETED_EXT")
    @ApiParam(value = "是否已删除")
    public Integer isDeletedExt;

    @Column(name="CREATE_USER_EXT")
    @ApiParam(value = "创建用户")
    public String createUserExt;

    @Column(name="CREATE_DATE_TIME_EXT")
    @ApiParam(value = "创建日期")
    public String createDatetimeExt;

    @Column(name="MODIFY_USER_EXT")
    @ApiParam(value = "修改人")
    public String modifyUserExt;

    @Column(name="MODIFY_DATE_TIME_EXT")
    @ApiParam(value = "修改日期")
    public String modifyDatetimeExt;

    @Column(name = "PERSONNEL_COST")
    @ApiParam("人件费")
    private String personnelCost;

    @Column(name = "CATEGORY_CODE")
    @ApiParam("产品别")
    private String categoryCode;

    @Column(name = "CAREER_CODE")
    @ApiParam("事业别")
    private String careerCode;

    @Column(name = "WORK_TAKT", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("生产节拍")
    private Double workTakt;


}
