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 : amy
 * @CreateDate : 2019-06-11 15:01
 * @Modify:
 **/
@Data
@Entity
@Table(name="WMS_WORK_CENTER_ZONE")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api(value="工作中心线边库区关系",description = "工作中心线边库区关系")
public class WmsWorkCenterZone extends BaseBean {
    private static final long serialVersionUID = 950689993212839817L;

    @Column(name = "WORK_CENTER_CODE")
    @ApiParam(value = "工作中心代码")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.LIST, getValWay = CommonEnumUtil.DYNAMIC_FIELD_GET_WAY.OBJ,
            dataSrc = "cn.estsh.i3plus.pojo.wms.bean.WmsWorkCenter",
            searchColumnName = "workCenterCode,workCenterName", listColumnName = "workCenterCode,workCenterName", explicitColumnName = "workCenterCode")
    private String workCenterCode;

    @Column(name = "ZONE_NO")
    @ApiParam(value = "线边库区")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.LIST,  getValWay = CommonEnumUtil.DYNAMIC_FIELD_GET_WAY.OBJ,
            dataSrc = "cn.estsh.i3plus.pojo.wms.bean.WmsZones",
            searchColumnName = "zoneNo,zoneName", listColumnName = "zoneNo,zoneName", explicitColumnName = "zoneNo")
    private String zoneNo;

    @Column(name = "WORK_CENTER_NAME")
    @ApiParam("工作中心名称")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.LIST, isRequire = 2, getValWay = CommonEnumUtil.DYNAMIC_FIELD_GET_WAY.OBJ,
            dataSrc = "cn.estsh.i3plus.pojo.wms.bean.WmsWorkCenter",
            searchColumnName = "workCenterCode,workCenterName", listColumnName = "workCenterCode,workCenterName", explicitColumnName = "workCenterName")
    private String workCenterName;

    @Column(name = "ZONE_NAME")
    @ApiParam("线边库区名称")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.LIST, isRequire = 2, getValWay = CommonEnumUtil.DYNAMIC_FIELD_GET_WAY.OBJ,
            dataSrc = "cn.estsh.i3plus.pojo.wms.bean.WmsZones",
            searchColumnName = "zoneNo,zoneName", listColumnName = "zoneNo,zoneName", explicitColumnName = "zoneName")
    private String zoneName;
}
