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.Index;
import javax.persistence.Table;


/**
 * @Description : 北京海纳川任务明细
 * @Reference :
 * @Author : puxiao.liao
 * @CreateDate : 2018-11-17 14:50
 * @Modify:
 **/
@Data
@Entity
@Table(name = "WMS_AUTO_FORK_CALL_BACK_DETAILS", indexes = {
        @Index(columnList = "TASK_CODE")
})
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Api(value = "无人叉车任务明细", description = "喜德无人叉车任务明细")
public class WmsAutoForkCallBackDetails extends BaseBean {
    private static final long serialVersionUID = -8103992000562208799L;

    @Column(name = "REQ_CODE")
    @ApiParam(value = "请求编号")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String reqCode;


    @Column(name = "REQ_TIME")
    @ApiParam(value = "请求时间")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String reqTime;

    @Column(name = "CLIENT_CODE")
    @ApiParam(value = "客服端编号")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String clientCode;

    @Column(name = "TOKEN_CODE")
    @ApiParam(value = "令牌号")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String tokenCode;

    @Column(name = "INTERFACE_NAME")
    @ApiParam(value = "接口名称")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String interfaceName;

    @Column(name = "METHOD")
    @ApiParam(value = "方法名称")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String method;

    @Column(name = "TASK_CODE")
    @ApiParam(value = "任务单号")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String taskCode;

    @Column(name = "WB_CODE")
    @ApiParam(value = "工作为")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String wbCode;

    @Column(name = "POD_CODE")
    @ApiParam(value = "货架编号")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String podCode;

    @Column(name = "CURRENT_POSITION_CODE")
    @ApiParam(value = "子任务的位置编号")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String currentPositionCode;

    @Column(name = "ROBOT_CODE")
    @ApiParam(value = "执行任务的VGA编号")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.TEXT)
    private String robotCode;

    @Column(name = "STATUS", nullable = false, columnDefinition = "int default 10")
    @ApiParam("处理标准")
    @DynamicField(webFieldType = CommonEnumUtil.FIELD_TYPE.SELECT, isRequire = 2, dataSrc = "AUTO_FORK_TASK_STATUS")
    @AnnoOutputColumn(refClass = WmsEnumUtil.TRUE_OR_FALSE.class, refForeignKey = "value", value = "description", hidden = true)
    public Integer status;

    @Column(name = "REMARK", nullable = false)
    @ApiParam("备注")
    public String remark;

}
