package cn.estsh.i3plus.pojo.mes.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.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * @Description:
 * @Author: jokelin
 * @Date: 2021/3/4 7:16 PM
 * @Modify:
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "MES_QUARANTINE_RECORD", indexes = {
        @Index(columnList = "SERIAL_NUMBER"),
        @Index(columnList = "PART_NO")
})
@Api("隔离记录表")
public class MesQuarantineRecord extends BaseBean {
    private static final long serialVersionUID = -4667731056014803186L;

    @Column(name = "SERIAL_NUMBER")
    @ApiParam("过程条码")
    private String serialNumber;

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

    @Column(name = "PART_NAME")
    @ApiParam("零件名称")
    private String partName;

    @Column(name = "QTY")
    @ApiParam("用量")
    private Integer qty;

    @Column(name = "WORK_CELL_CODE")
    @ApiParam("工作单元代码")
    private String workCellCode;

    @Column(name = "WORK_CENTER_CODE")
    @ApiParam("工作中心")
    private String workCenterCode;

    @Column(name = "DEFECT_CODE")
    @ApiParam("缺陷代码")
    private String defectCode;

    @Column(name = "DC_CODE")
    @ApiParam("缺陷原因代码")
    private String dcCode;

    @Column(name = "REPAIR_CODE")
    @ApiParam("维修代码")
    private String repairCode;

    @Column(name = "QUARANTINE_NO")
    @ApiParam("隔离单号")
    private String quarantineNo;

    @Column(name = "SCRAP_No")
    @ApiParam("报废单号")
    private String scrapNo;

    @Column(name = "DEFECT_NAME")
    @ApiParam("缺陷名称")
    private String defectName;

    @Column(name = "DC_NAME")
    @ApiParam("缺陷原因名称")
    private String dcName;

    @Column(name = "REPAIR_NAME")
    @ApiParam("维修名称")
    private String repairName;

    @Column(name = "IS_CANCEL_REPAIR")
    @ApiParam("取消报废")
    private Integer isCancelScrap;
}
