package cn.estsh.i3plus.ext.mes.pojo.model.bu;

import cn.estsh.i3plus.ext.mes.pojo.util.MesExtEnumUtil;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;

import java.io.Serializable;

/**
 * @PROJECT_NAME: i3plus-mes-panasonic-bu
 * @DESCRIPTION: 字段履历配置表-作用1：修改基础表字段时根据该表判断是否记录字段修改履历
 * @USER: xinwang.yi
 * @DATE: 2022-07-07 16:06
 */
@Data
@Api("数据履历 MODEL")
public class SxMesDataTravelExtModel implements Serializable {

    private static final long serialVersionUID = 1099841044247876300L;

    @ApiParam("id")
    private Long id;

    @ApiParam("组织代码")
    private String organizeCode;

    @ApiParam("有效性")
    private Integer isValid;

    @ApiParam("是否已删除")
    private Integer isDeleted;

    @ApiParam("创建人")
    private String createUser;

    @ApiParam("创建时间")
    private String createDatetime;

    @ApiParam("更新人")
    private String modifyUser;

    @ApiParam("更新时间")
    private String modifyDatetime;

    @ApiParam("菜单代码")
    @AnnoOutputColumn(refClass = MesExtEnumUtil.FIELD_MENU_TYPE.class, refForeignKey = "value", value = "description")
    private Integer menuCode;

    @ApiParam("物料编码")
    private String partNo;

    @ApiParam("物料名称")
    private String partNameRdd;

    @ApiParam("字段代码")
    private String fieldCode;

    @ApiParam("变更前")
    private String beforeChange;

    @ApiParam("变更后")
    private String afterChange;

    @ApiParam("变更原因/凭证")
    private String voucher;

    @ApiParam("首件编号")
    private String initialWorkpieceNo;

    @ApiParam("工技是否确认")
    @AnnoOutputColumn(refClass = MesExtEnumUtil.CONFIRM_TYPE.class, refForeignKey = "value", value = "description")
    private Integer skillIsConfirm = 20;

    @ApiParam("工技确认人")
    private String skillIsConfirmUser;

    @ApiParam("工技确认时间")
    private String skillIsConfirmTime;

    @ApiParam("制造是否确认")
    @AnnoOutputColumn(refClass = MesExtEnumUtil.CONFIRM_TYPE.class, refForeignKey = "value", value = "description")
    private Integer manufacturingIsConfirm = 20;

    @ApiParam("制造确认人")
    private String manufacturingIsConfirmUser;

    @ApiParam("制造确认时间")
    private String manufacturingIsConfirmTime;

    @ApiParam("字段名称")
    private String fieldName;

    @ApiParam("子物料编码")
    private String itemPartNo;

    @ApiParam("子物料名称")
    private String itemPartNameRdd;

    @ApiParam("工序代码")
    private String processCode;

    @ApiParam("工序名称")
    private String processName;

    public SxMesDataTravelExtModel(Long id, String organizeCode, Integer isValid, Integer isDeleted, String createUser, String createDatetime, String modifyUser, String modifyDatetime, Integer menuCode, String partNo, String partNameRdd, String fieldCode, String beforeChange, String afterChange, String voucher, String initialWorkpieceNo, Integer skillIsConfirm, String skillIsConfirmUser, String skillIsConfirmTime, Integer manufacturingIsConfirm, String manufacturingIsConfirmUser, String manufacturingIsConfirmTime, String itemPartNo, String itemPartNameRdd, String processCode, String processName,String fieldName) {
        this.id = id;
        this.organizeCode = organizeCode;
        this.isValid = isValid;
        this.isDeleted = isDeleted;
        this.createUser = createUser;
        this.createDatetime = createDatetime;
        this.modifyUser = modifyUser;
        this.modifyDatetime = modifyDatetime;
        this.menuCode = menuCode;
        this.partNo = partNo;
        this.partNameRdd = partNameRdd;
        this.fieldCode = fieldCode;
        this.beforeChange = beforeChange;
        this.afterChange = afterChange;
        this.voucher = voucher;
        this.initialWorkpieceNo = initialWorkpieceNo;
        this.skillIsConfirm = skillIsConfirm;
        this.skillIsConfirmUser = skillIsConfirmUser;
        this.skillIsConfirmTime = skillIsConfirmTime;
        this.manufacturingIsConfirm = manufacturingIsConfirm;
        this.manufacturingIsConfirmUser = manufacturingIsConfirmUser;
        this.manufacturingIsConfirmTime = manufacturingIsConfirmTime;
        this.itemPartNo = itemPartNo;
        this.itemPartNameRdd = itemPartNameRdd;
        this.processCode = processCode;
        this.processName = processName;
        this.fieldName = fieldName;
    }

    public SxMesDataTravelExtModel() {
    }
}
