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

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
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.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @author Wynne.Lu
 * @date 2020/4/18 21:05
 * @desc
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_QC_ORDER_APPROVAL_STATUS")
@Api("检测单审批状态表")
public class MesQcOrderApprovalStatus extends BaseBean implements Serializable {
    private static final long serialVersionUID = -3157480917343280506L;

    @Column(name = "ORDER_NO")
    @ApiParam("质检单号")
    private String orderNo;

    @Column(name = "WORK_CENTER_CODE")
    @ApiParam("产线")
    private String workCenterCode;

    @Column(name = "PART_NO")
    @ApiParam("零件号")
    private String partNo;

    @Column(name = "WORK_ORDER_NO")
    @ApiParam("工单号")
    private String workOrderNo;

    @Column(name = "PLAN_QTY", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("计划数量")
    private Double planQty;

    @Column(name = "CHECK_TYPE")
    @ApiParam("检验类型")
    private Integer checkType;

    @Column(name = "QC_USER")
    @ApiParam("检查人")
    private String qcUser;

    @Column(name = "CHECK_RESULT")
    @ApiParam("检验结果")
    private String checkResult;

    @Column(name = "IS_KEY_CHECK_ITEM")
    @ApiParam("是否关键检测")
    private Integer isKeyCheckItem;

    @Column(name = "QUALITY_APPROVAL_STATUS")
    @ApiParam("质量经理审批状态")
    private Integer qualityApprovalStatus = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue();

    @Column(name = "QUALITY_CHOICE")
    @ApiParam("质量经理审批状态")
    private Integer qualityChoice;

    @Column(name = "PRODUCE_APPROVAL_STATUS")
    @ApiParam("生产经理审批状态")
    private Integer produceApprovalStatus = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue();

    @Column(name = "PRODUCE_CHOICE")
    @ApiParam("生产经理审批状态")
    private Integer produceChoice;

    @Column(name = "APPROVAL_STATUS")
    @ApiParam("生产经理审批状态")
    private Integer approvalStatus = CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue();


}
