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 : puxiao.liao
 * @CreateDate : 2020-08-19 14:50
 * @Modify:
 **/
@Data
@Entity
@Table(name = "WMS_PART_CHANGE")
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api(value = "零件装换信息", description = "零件装换信息")
public class WmsPartChange extends BaseBean {
    private static final long serialVersionUID = -2857107665974689720L;

    @Column(name = "BEF_PART_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.WmsPart",
            searchColumnName = "partNo,partName", listColumnName = "partNo,partName", explicitColumnName = "partNo")
    private String befPartNo;

    @Column(name = "AFT_PART_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.WmsPart",
            searchColumnName = "partNo,partName", listColumnName = "partNo,partName", explicitColumnName = "partNo")
    private String aftPartNo;


    @Column(name = "REMARK")
    @ApiParam(value = "备注")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String remark;

}
