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 : jessica.chen
 * @CreateDate : 2019-12-03 14:21
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="WMS_TERMINAL")
@Api("工位信息")
public class WmsTerminal extends BaseBean{

    private static final long serialVersionUID = 9214639813072592713L;
    @Column(name="TERMINAL_NO")
    @ApiParam("工位代码")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String terminalNo;

    @Column(name="TERMINAL_NAME")
    @ApiParam("工位名称")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String terminalName;

    @Column(name="PDLINE_NO")
    @ApiParam("产线代码")
    @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 pdlineNo;
}