package cn.estsh.i3plus.pojo.ptl.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.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;
import java.util.ArrayList;
import java.util.List;

/**
 * @author Wynne.Lu
 * @date 2020/2/12 17:41
 * @desc
 */

@Data
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "PTL_AREA_SECTION_TASK")
@EqualsAndHashCode(callSuper = true)
@Api("区段亮灯任务")
public class PtlAreaSectionTask extends BaseBean implements Serializable {

    private static final long serialVersionUID = 3594963385331020252L;

    @Column(name = "SECTION_TASK_NO")
    @ApiParam("区段任务编号")
    private String sectionTaskNo;

    @Column(name = "AREA_TASK_NO")
    @ApiParam("区域任务编号")
    private String areaTaskNo;

    @Column(name = "SECTION_NO")
    @ApiParam("区段编号")
    private String sectionNo;

    @Column(name = "AREA_NO")
    @ApiParam("区域编号")
    private String areaNo;

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

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

    @Column(name = "PROD_CFG_CODE")
    @ApiParam("产品组代码")
    private String prodCfgCode;

    @Column(name = "PROD_CFG_NAME")
    @ApiParam("产品组名称")
    private String prodCfgName;

    @Column(name = "CUST_FLAG_NO")
    @ApiParam("客户标识号")
    private String custFlagNo;

    @Column(name = "VIN_CODE")
    @ApiParam("VIN号")
    private String vinCode;

    @Column(name = "DETAIL_SEQ")
    @ApiParam("明细顺序号")
    private Integer detailSeq;

    @Column(name = "PART_LOCATION")
    @ApiParam("产品位置")
    private String partLocation;

    @Column(name = "SN")
    @ApiParam("产品条码")
    private String sn;

    @Column(name = "STATUS")
    @ApiParam("区段任务状态")
    private Integer status;

    @Column(name = "SEQ")
    @ApiParam("区段任务顺序号")
    private Integer seq;

    @Column(name = "qty")
    @ApiParam("数量")
    private Integer qty;

    @ApiParam("区域任务明细")
    @Transient
    private List<PtlAreaSectionTaskDetail> ptlAreaSectionTaskDetailList=new ArrayList<>();
}
