package com.wms_main.model.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDateTime;

/**
 * 数据库Task表映射
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "t_app_task", autoResultMap = true)
public class TAppTask {
    /**
     * 任务ID
     */
    @TableId(value = "task_id")
    private String taskId;
    /**
     * 任务类型
     */
    @TableField(value = "task_type")
    private Integer taskType;

    @TableField(value = "task_group")
    private String taskGroup;
    /**
     * 任务状态
     */
    @TableField(value = "task_status")
    private Integer taskStatus;
    /**
     * 任务优先级
     */
    @TableField(value = "task_priority")
    private Integer taskPriority;
    /**
     * 载具号
     */
    @TableField(value = "vehicle_id")
    private String vehicleId;
    /**
     * 起点
     */
    @TableField(value = "origin")
    private String origin;
    /**
     * 终点
     */
    @TableField(value = "destination")
    private String destination;
    /**
     * wcs任务id
     */
    @TableField(value = "wcs_task_id")
    private String wcsTaskId;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;
    /**
     * 完成时间
     */
    @TableField(value = "finish_time")
    private LocalDateTime finishTime;
    /**
     * 操纵用户
     */
    @TableField(value = "op_user")
    private String opUser;
    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;

    public TAppTaskBak of() {
        TAppTaskBak tAppTaskBak = new TAppTaskBak();
        tAppTaskBak.setTaskId(taskId);
        tAppTaskBak.setTaskType(taskType);
        tAppTaskBak.setTaskGroup(taskGroup);
        tAppTaskBak.setTaskStatus(taskStatus);
        tAppTaskBak.setTaskPriority(taskPriority);
        tAppTaskBak.setVehicleId(vehicleId);
        tAppTaskBak.setOrigin(origin);
        tAppTaskBak.setDestination(destination);
        tAppTaskBak.setWcsTaskId(wcsTaskId);
        tAppTaskBak.setCreateTime(createTime);
        tAppTaskBak.setFinishTime(finishTime);
        tAppTaskBak.setOpUser(opUser);
        tAppTaskBak.setRemark(remark);

        return tAppTaskBak;
    }
}
