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

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.annotation.DynamicField;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil;
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;

/**
 * @Description : 物理包装信息
 * @Reference :
 * @Author : silliter.yuan
 * @CreateDate : 2018-11-06 15:58
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="WMS_PACKAGE")
@Api("物理包装信息")
public class WmsPackage extends BaseBean {

    private static final long serialVersionUID = -8009404275658985601L;
    @Column(name="PACKAGE_NO")
    @ApiParam("包装编号")
    public String packageNo;

    @Column(name="PACKAGE_TYPE_ID")
    @AnnoOutputColumn(refClass = WmsEnumUtil.PACKAGE_TYPE.class)
    @ApiParam(value = "包装类型", example = "1")
    public Integer packTypeId;

    @Column(name="PARENT_PACKAGE_NO")
    @ApiParam("上级包装编号")
    public String parentPackageNo;

    @Column(name="PACKAGE_QTY")
    @ApiParam(value = "包装件数", example = "1")
    public Integer packageQty;

    @Column(name="PACK_SPEC")
    @ApiParam(value = "包装规格")
    public String packSpec;

    @Column(name="POCKET_NO")
    @ApiParam(value = "容器编号")
    public String pocketNo;

    @Column(name="PRINT_STATUS")
    @ApiParam(value = "打印状态", example = "1")
    @AnnoOutputColumn(refClass = WmsEnumUtil.PRINT_STATUS.class)
    public Integer printStatus;

    @Column(name="PACK_LEVEL")
    @ApiParam(value = "包装层级", example = "1")
    public Integer packLevel;

    @Column(name="MEMO")
    @ApiParam(value = "备注")
    public String memo;

    @Column(name = "LOCATE_NO")
    @ApiParam(value = "库位代码")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String locateNo;
}
