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

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;

/**
 * @Description:
 * @Author: jokelin
 * @Date: 2020/5/12 5:53 下午
 * @Modify:
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_PART_STOCK_SCHEDULE")
@Api("MES_库存排程配置")
public class MesPartStockSchedule extends BaseBean implements Serializable {

    private static final long serialVersionUID = -8265586624645977526L;

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

    @Column(name = "MIN_CAPACITY")
    @ApiParam("最小库存")
    private Integer minCapacity = 0;

    @Column(name = "MAX_CAPACITY")
    @ApiParam("最大库存")
    private Integer maxCapacity = 0;

    @Column(name = "TOTAL_CAPACITY")
    @ApiParam("总容量")
    private Integer totalCapacity;

    @Column(name = "STANDARD_CAPACITY")
    @ApiParam("标准值")
    private Integer standardCapacity;

    @Column(name = "SCHEDULE_CAPACITY")
    @ApiParam("待生产箱数")
    private Integer scheduleCapacity;

    @Column(name = "PLAN_QTY")
    @ApiParam("产品JSP个数")
    private Integer planQty;

    @Column(name = "TOTAL_PLAN_QTY")
    @ApiParam("JSP总数")
    private Integer totalPlanQty;

    @Column(name = "PROD_CFG_CODE")
    @ApiParam("配置代码")
    private String prodCfgCode;

    @Column(name = "IS_SMALL_SIZE")
    @ApiParam("是否小尺寸物料")
    private Integer isSmallSize = 1;

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

    @Column(name = "PROCESS_CODE")
    @ApiParam("工序代码")
    private String processCode;

    @Column(name = "STOCK_QTY")
    @ApiParam("排程实时库存")
    private Integer stockQty;

    @Column(name = "MIN_GEN_LOT")
    @ApiParam("最小下达批次")
    private Integer minGenLot;

    @Transient
    @ApiParam("已下达箱数")
    private Integer alreadyLandedNum;

    @Transient
    @ApiParam("当前库存")
    private Integer currentStock;

    @Transient
    @ApiParam("物料名称")
    private String partName;
}
