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.Data;
import lombok.EqualsAndHashCode;
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: jessica.chen
 * @CreateDate: 2019\11\15 10:01
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name = "MES_QUEUE_ORDER_BOM", indexes = {
        @Index(columnList = "ORGANIZE_CODE"),
        @Index(columnList = "ORDER_NO"),
        @Index(columnList = "PART_NO"),
        @Index(columnList = "PRODUCE_CTGY_CODE")
})
@Api("MES_生产队列散件清单")
public class MesQueueOrderBom extends BaseBean  implements Serializable {

    private static final long serialVersionUID = -5412635747424111476L;
    @Column(name = "ORDER_NO")
    @ApiParam("主队列编号")
    private String orderNo;

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

    @Column(name = "ASSY_NO")
    @ApiParam("组件编号")
    private String assyNo;

    @Column(name = "PRODUCE_CTGY_CODE")
    @ApiParam("产品位置代码")
    private String produceCtgyCode;

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

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

    @Column(name = "COLOR_CODE")
    @ApiParam("颜色代码")
    private String colorCode;

    @Column(name = "OPTION_TYPE")
    @ApiParam("选配类型")
    private Integer optionType;

    @Transient
    @ApiParam("物料类型3")
    private String categoryCode3;
}
