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

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 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.util.List;

/**
 * @Description :存储区
 * @Reference :
 * @Author : hansen.ke
 * @CreateDate : 2018-11-06 11:50
 * @Modify:
 **/
@Data
@Entity
@Table(name="WMS_ROUTING")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api(value="物流线路信息表",description = "物流线路信息表")
public class WmsRouting extends BaseBean {

    private static final long serialVersionUID = 7759454799191378612L;
    @Column(name = "ROUTING_CODE")
    @ApiParam(value = "线路代码")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String routingCode;

    @Column(name = "ROUTING_NAME")
    @ApiParam(value = "线路名称")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String routingName;

    @Column(name = "ROUTING_DESC")
    @ApiParam(value = "线路描述")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT, isRequire = 2)
    private String routingDesc;

    @Column(name = "FOR_PROUCT_CLASS")
    @ApiParam(value = "适用产品分类")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.SELECT,  dataSrc = "TRUE_OR_FALSE")
    private Integer forProductClass;

    @Column(name = "FOR_WAREHOUSE")
    @ApiParam(value = "适用仓库", example ="1")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.SELECT,  dataSrc = "TRUE_OR_FALSE")
    private Integer forWareHouse;

    @Column(name = "FOR_PRODUCT")
    @ApiParam(value = "适用产品")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.SELECT,  dataSrc = "TRUE_OR_FALSE")
    private Integer forProduct;

	@Transient
	@ApiParam(value = "补货规则列表")
	List<WmsRoutingRule> replenishList;
	@Transient
	@ApiParam(value = "推动规则列表补")
	List<WmsRoutingRule> promotionList;

	public WmsRouting() {
	}

}
