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;

/**
 * 文件描述
 *
 * @author xiangming.liao
 * @date 2021年03月23日 10:38
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Inheritance(strategy = InheritanceType.JOINED)
@Table(name = "MES_PACKAGE_RECORD")
@NoArgsConstructor
@AllArgsConstructor
@Api("包装记录表")
public class MesPackageRecord extends BaseBean implements Serializable {

    private static final long serialVersionUID = -2396234884718189241L;

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

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

    @Column(name="WORK_CELL_CODE")
    @ApiParam(value ="工位代码")
    private String workCellCode;

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

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

    @Column(name = "LOT_NO")
    @ApiParam("批次")
    private String lotNo;

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

    @Column(name = "UNIT")
    @ApiParam("单位")
    private String unit;

    @Column(name = "CT_NO")
    @ApiParam("容器编号")
    private String ctNo;

    @Column(name = "PACKAGE_NO")
    @ApiParam("包装条码")
    private String packageNo;

    //物料类型 10=半成品，20=成品
    @Column(name = "PART_TYPE")
    @ApiParam("物料类型")
    private Integer partType;

    //容器使用状态 10=空闲，20=占用
    @Column(name = "CONTAINER_USE_STATUS")
    @ApiParam("容器使用状态")
    private String containerUseStatus;
}
