package cn.estsh.i3plus.pojo.mes.pcn.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.*;
import java.io.Serializable;
import java.util.List;

/**
 * @Description:
 * @Reference:
 * @Author: joke.wang
 * @CreateDate: 2019\10\16 19:53
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_DEFECT_RECORD", indexes = {
        @Index(columnList = "SERIAL_NUMBER"),
        @Index(columnList = "CREATE_DATE_TIME")
})
@Api("不良信息记录表")
public class MesDefectRecord extends BaseBean implements Serializable {
    private static final long serialVersionUID = -2828208776424343584L;
    @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 = "DEFECT_CODE")
    @ApiParam("缺陷代码")
    private String defectCode;

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

    @Column(name = "DEFECT_LOCATION")
    @ApiParam("缺陷位置")
    private String defectLocation;

    @Column(name = "SIDE_LOCATION")
    @ApiParam("面位")
    private String sideLocation;

    @Column(name = "REPAIR_STATUS")
    @ApiParam("维修状态")
    private Integer repairStatus;

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

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

    @Column(name = "MEMO")
    @ApiParam("备注")
    private String memo;

    @Transient
    private List<MesDefect> mesDefectList;
}
