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;

/**
 * @Description : 客户发往地
 * @Reference :
 * @Author : hansen.ke
 * @CreateDate : 2018-11-07 14:38
 * @Modify:
 **/
@Data
@Entity
@Table(name="WMS_SHIPPING_FLAG")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api(value="客户发往地信息表",description = "客户发往地信息表")
public class WmsShippingFlag extends BaseBean {

    private static final long serialVersionUID = 8034283413609254479L;

    @Column(name = "CUST_NO")
    @ApiParam(value = "客户编号")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.LIST, isRequire = 2, getValWay = CommonEnumUtil.DYNAMIC_FIELD_GET_WAY.OBJ,
            dataSrc = "cn.estsh.i3plus.pojo.wms.bean.BasCustomer",
            searchColumnName = "custNo,custName", listColumnName = "custNo,custName", explicitColumnName = "custNo")
    private String custNo;

    @Column(name = "FLAG_NO")
    @ApiParam(value = "客户发往地编号")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String flagNo;

    @Column(name = "FLAG_NAME")
    @ApiParam(value = "客户发往地名称")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String flagName;

    @Column(name = "SHIPP_QTY")
    @ApiParam(value = "发运数量控制")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER, isRequire = 2)
    private Integer shippQty;

    @Column(name = "FLAG_DESC")
    @ApiParam(value = "全称")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT, isRequire = 2)
    private String flagDesc;

    @Column(name = "FLAG_ADDR")
    @ApiParam(value = "客户发往地址")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT, isRequire = 2)
    private String flagAddr;

    @Column(name = "FLAG_OWNER")
    @ApiParam(value = "联系人")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT, isRequire = 2)
    private String flagOwner;

    @Column(name = "FLAG_EMAIL")
    @ApiParam(value = "邮箱")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT, isRequire = 2)
    private String flagEmail;

    @Column(name = "FLAG_TEL")
    @ApiParam(value = "联系人电话")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT, isRequire = 2)
    private String flagTel;

    @Column(name = "FLAG_FAX")
    @ApiParam(value = "传真")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT, isRequire = 2)
    private String flagFax;

    @Column(name = "DEST_ZONE_NO")
    @ApiParam(value = "存储区")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT, isRequire = 2)
    private String destZoneNo;

    @Column(name="TEMPLATE_NO")
    @ApiParam("模板编号")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.LIST,  getValWay = CommonEnumUtil.DYNAMIC_FIELD_GET_WAY.URL,
            dataSrc = "/wms/label/sys-label-template/cloud-query",
            searchColumnName = "templateCode,templateName",listColumnName = "templateCode,templateName", explicitColumnName = "templateCode")
    private String templateNo;
}
