package com.shkj.wms.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.shkj.common.annotation.Excel;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * 作业任务对象 busin_task
 *
 * @author lch
 * @date 2023-02-27
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("busin_task")
public class BusinTask implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * $column.columnComment
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Excel(name = "${comment}", width = 15)
    private Long id;


    /**
     * 任务编号
     */
    @Excel(name = "任务编号", width = 20)
    private String taskCode;


    /**
     * 业务id
     */
    @Excel(name = "业务id", width = 20)
    private Long orderId;


    /**
     * 业务编号
     */
    @Excel(name = "业务编号", width = 20)
    private String orderNo;


    /**
     * 状态 未下发=0 执行中=1 下发成功=2 下发失败=-1
     */
    @Excel(name = "状态 未下发 执行中 下发成功 下发失败", width = 20)
    private String status;


    /**
     * 类型 入库=in 出库=out 搬运=move
     */
    @Excel(name = "类型 入库 出库 搬运", width = 20)
    private String type;


    /**
     * 作业方式 PDA AGV CTU
     */
    @Excel(name = "作业方式 PDA AGV CTU", width = 20)
    private String way;


    /**
     * 任务路径
     */
    private String taskPath;

    /**
     * 任务类型 重新执行的时候根据这个类型判断
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String taskType;


    /**
     * 异常信息
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String errMsg;


    /**
     * 货主id
     */
    private Long consignorId;

    /**
     * 仓ID
     */
    @Excel(name = "仓ID", width = 20)
    private Long branchId;


    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+7")
    private Date createTime;


    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @Excel(name = "创建人", width = 20)
    private String createBy;


    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+7")
    private Date updateTime;


    /**
     * 修改人
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Excel(name = "修改人", width = 20)
    private String updateBy;


}
