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.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

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

/**
 * @Description:
 * @Reference:
 * @Author: wangjie
 * @CreateDate: 2019\11\15 10:12
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "MES_OUT_PUT_STATISTICS_TRAVEL", indexes = {
        @Index(columnList = "WORK_ORDER_NO,SHIFT_CODE,WORK_TIME"),
})
@NoArgsConstructor
@AllArgsConstructor
@Api("产量统计履历表")
public class MesOutPutStatisticsTravel extends BaseBean implements Serializable {

    private static final long serialVersionUID = -1171431564004423787L;

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

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

    @Column(name = "SHIFT_CODE")
    @ApiParam("班次代码")
    private String shiftCode;

    @Column(name = "WORK_TIME")
    @ApiParam("作业时间")
    private String workTime;

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

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

    @Column(name = "PART_NAME_RDD")
    @ApiParam("物料名称")
    private String partNameRdd;

    @Column(name = "START_TIME")
    @ApiParam("开始时间")
    private String startTime;

    @Column(name = "END_TIME")
    @ApiParam("结束时间")
    private String endTime;

    @Column(name = "ORDER_START_TIME")
    @ApiParam("工单开始时间")
    private String orderStartTime;

    @Column(name = "QTY", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("产量")
    private Double qty;

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

    @Column(name = "REMARK")
    @ApiParam("备注")
    private String remark;

    //----BU二期-------
    @Column(name = "WORK_ORDER_TYPE")
    @ApiParam("工单类型")
    private Integer workOrderType;

    @Column(name = "REMAKE_QTY", columnDefinition = "decimal(18,8)")
    @ColumnDefault("0")
    @ApiParam("改造产量")
    private Double remakeQty;
    //----BU二期-------

    @Column(name = "PID")
    @ApiParam(value = "pid")
    private Long pid;

    @Column(name = "SEQ")
    @ApiParam(value = "序号")
    private Integer seq;

}
