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

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
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 cn.estsh.i3plus.pojo.base.enumutil.WmsEnumUtil;
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 : RFID条码操作记录表
 * @Reference :
 * @Author : jimmy.zeng
 * @CreateDate : 2020-07-10 14:38
 * @Modify:
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="WMS_RFID_OPERATE_RECORD")
@Api("RFID条码操作记录表")
public class WmsRfidOperateRecord extends BaseBean {
    private static final long serialVersionUID = -2506345764570725810L;

    @Column(name="RFID_SN")
    @ApiParam("RFID_条码")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    public String rfidSn;

    @Column(name="OPERATE_TYPE")
    @ApiParam("操作类型")
    @AnnoOutputColumn(refClass = WmsEnumUtil.RFID_OPERATE_TYPE.class)
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER, dataSrc = "RFID_OPERATE_TYPE")
    public Integer operateType;

    @Column(name="SRC_LOCATE")
    @ApiParam("源库位")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    public String srcLocate;

    @Column(name="DEST_LOCATE")
    @ApiParam("目标库位")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    public String destLocate;

    @Column(name="SRC_QTY")
    @ApiParam("源数量")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER)
    public Integer srcQty;

    @Column(name="DEST_QTY")
    @ApiParam("目标数量")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.NUMBER)
    public Integer destQty;
}
