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

import javax.persistence.*;
import java.io.Serializable;

/**
 * @PROJECT_NAME: i3plus-mes-panasonic-bu
 * @DESCRIPTION:
 * @USER: xinwang.yi
 * @DATE: 2022-01-18 15:22
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(
        name = "MES_PROD_UNBIND_RECORD",
        indexes = {@Index(
                columnList = "SERIAL_NUMBER"
        ), @Index(
                columnList = "PART_NO"
        ), @Index(
                columnList = "MODIFY_DATE_TIME"
        ), @Index(
                columnList = "MODIFY_USER"
        ), @Index(
                columnList = "WORK_CENTER_CODE"
        )}
)
@Api("产品解绑记录表")
public class MesProdUnbindRecord extends BaseBean implements Serializable {

    private static final long serialVersionUID = -7049698777877661681L;

    @Column(name = "SYSTEM_SYNC_STATUS")
    @ColumnDefault("2")
    @ApiParam(value = "系统同步标志")
    public Integer systemSyncStatus = 2;

    @Column(
            name = "SERIAL_NUMBER",
            nullable = false
    )
    @ApiParam("产品条码")
    private String serialNumber;

    @Column(
            name = "PART_NO"
    )
    @ApiParam("物料号")
    private String partNo;

    @Column(
            name = "PART_NAME"
    )
    @ApiParam("物料名称")
    private String partName;

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

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

}
