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

import cn.estsh.i3plus.ext.mes.pcn.pojo.util.MesPcnExtEnumUtil;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
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;

/**
 * @Description :配置表
 * @Reference :
 * @Author : wangjie
 * @CreateDate : 2019-06-04
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "MES_REWORK_ORDER", indexes = {
        @Index(columnList = "REWORK_ORDER_NO"),
})
@Api("返工工单表")
public class MesReworkOrder extends BaseBean implements Serializable {

    private static final long serialVersionUID = -2096199087560300498L;

    @Column(name = "REWORK_ORDER_NO")
    @ApiParam("返工工单号")
    private String reworkOrderNo;

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

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

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

    @Column(name = "WO_STATUS")
    @AnnoOutputColumn(refClass = MesPcnExtEnumUtil.WORK_ORDER_STATUS.class, refForeignKey = "value", value = "description")
    @ApiParam("工单状态")
    private Integer workOrderStatus;

    @Column(name = "SYSTEM_SYNC_STATUS")
    @ApiParam("同步字段")
    private Integer systemSyncStatus;

}
