package cn.estsh.i3plus.pojo.ptl.bean;

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
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 java.io.Serializable;

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

@Data
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "PTL_BOM")
@EqualsAndHashCode(callSuper = true)
public class PtlBom extends BaseBean implements Serializable {

    private static final long serialVersionUID = 2676195473413945030L;

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

    @Column(name = "PART_NAME", columnDefinition = "varchar(255) default '1'", nullable = false)
    @ApiParam("父物料描述")
    private String partName;

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

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

    @Column(name = "ITEM_PART_NO")
    @ApiParam("子物料号")
    private String itemPartNo;

    @Column(name = "ITEM_PART_NAME")
    @ApiParam("子物料描述")
    private String itemPartName;

    @Column(name = "ITEM_UNIT")
    @ApiParam("子计量单位")
    private String itemUnit;

    @Column(name = "ITEM_QTY")
    @ApiParam("子用量")
    private Integer itemQty;

    @Column(name = "BOM_NUM")
    @ApiParam("BOM编号")
    private String bomNum;

    @Column(name = "BOM_VERSION")
    @ApiParam("BOM版本号")
    private String bomVersion;

    @Column(name = "EFF_START_TIME")
    @ApiParam("有效起始日期")
    private String effStartTime;

    @Column(name = "EFF_END_TIME")
    @ApiParam("有效截止日期")
    private String effEndTime;
}
