package cn.nianxx.thhotel.workflows.reservation.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;

/**
 * Reservation 任务实体。保存 AI 结果映射后的任务类型、任务卡类型和订单队列顺序。
 */
@TableName("workflow_reservation_task")
public class ReservationTaskEntity {

    /** 系统任务 ID。 */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /** 酒店或业务上下文 ID。 */
    private String hotelId;
    /** 当前挂靠订单 ID。 */
    private Long orderId;
    /** 来源消息 ID。 */
    private Long sourceMessageId;
    /** AI 过渡记录 ID。 */
    private Long aiTransitionId;
    /** AI 结果类型。 */
    private String resultType;
    /** AI 原始任务类型。 */
    private String aiTaskType;
    /** 系统主任务类型。 */
    private String systemTaskType;
    /** 任务卡类型。 */
    private String taskCardType;
    /** 业务动作 subtype。 */
    private String taskSubtype;
    /** 任务状态。 */
    private String taskStatus;
    /** 是否参与订单执行队列。 */
    private Boolean queueParticipation;
    /** 同订单执行顺序。 */
    private Integer executionOrder;
    /** 父任务 ID。 */
    private Long parentTaskId;
    /** 父任务 source event index。 */
    private Integer parentSourceEventIndex;
    /** 联动任务组 ID。 */
    private String linkedTaskGroupId;
    /** 是否等待父任务完成。 */
    private Boolean blockedUntilParentCompleted;
    /** 最近失败原因摘要。 */
    private String lastFailureReason;
    /** 用户最终确认任务字段和订单归属的 UTC 时间。 */
    private LocalDateTime confirmedAt;
    /** 任务完成 UTC 时间。 */
    private LocalDateTime completedAt;
    /** 乐观锁版本。 */
    private Long version;
    /** 记录创建 UTC 时间。 */
    private LocalDateTime createdAt;
    /** 记录更新 UTC 时间。 */
    private LocalDateTime updatedAt;

    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    public String getHotelId() { return hotelId; }
    public void setHotelId(String hotelId) { this.hotelId = hotelId; }
    public Long getOrderId() { return orderId; }
    public void setOrderId(Long orderId) { this.orderId = orderId; }
    public Long getSourceMessageId() { return sourceMessageId; }
    public void setSourceMessageId(Long sourceMessageId) { this.sourceMessageId = sourceMessageId; }
    public Long getAiTransitionId() { return aiTransitionId; }
    public void setAiTransitionId(Long aiTransitionId) { this.aiTransitionId = aiTransitionId; }
    public String getResultType() { return resultType; }
    public void setResultType(String resultType) { this.resultType = resultType; }
    public String getAiTaskType() { return aiTaskType; }
    public void setAiTaskType(String aiTaskType) { this.aiTaskType = aiTaskType; }
    public String getSystemTaskType() { return systemTaskType; }
    public void setSystemTaskType(String systemTaskType) { this.systemTaskType = systemTaskType; }
    public String getTaskCardType() { return taskCardType; }
    public void setTaskCardType(String taskCardType) { this.taskCardType = taskCardType; }
    public String getTaskSubtype() { return taskSubtype; }
    public void setTaskSubtype(String taskSubtype) { this.taskSubtype = taskSubtype; }
    public String getTaskStatus() { return taskStatus; }
    public void setTaskStatus(String taskStatus) { this.taskStatus = taskStatus; }
    public Boolean getQueueParticipation() { return queueParticipation; }
    public void setQueueParticipation(Boolean queueParticipation) { this.queueParticipation = queueParticipation; }
    public Integer getExecutionOrder() { return executionOrder; }
    public void setExecutionOrder(Integer executionOrder) { this.executionOrder = executionOrder; }
    public Long getParentTaskId() { return parentTaskId; }
    public void setParentTaskId(Long parentTaskId) { this.parentTaskId = parentTaskId; }
    public Integer getParentSourceEventIndex() { return parentSourceEventIndex; }
    public void setParentSourceEventIndex(Integer parentSourceEventIndex) { this.parentSourceEventIndex = parentSourceEventIndex; }
    public String getLinkedTaskGroupId() { return linkedTaskGroupId; }
    public void setLinkedTaskGroupId(String linkedTaskGroupId) { this.linkedTaskGroupId = linkedTaskGroupId; }
    public Boolean getBlockedUntilParentCompleted() { return blockedUntilParentCompleted; }
    public void setBlockedUntilParentCompleted(Boolean blockedUntilParentCompleted) { this.blockedUntilParentCompleted = blockedUntilParentCompleted; }
    public String getLastFailureReason() { return lastFailureReason; }
    public void setLastFailureReason(String lastFailureReason) { this.lastFailureReason = lastFailureReason; }
    public LocalDateTime getConfirmedAt() { return confirmedAt; }
    public void setConfirmedAt(LocalDateTime confirmedAt) { this.confirmedAt = confirmedAt; }
    public LocalDateTime getCompletedAt() { return completedAt; }
    public void setCompletedAt(LocalDateTime completedAt) { this.completedAt = completedAt; }
    public Long getVersion() { return version; }
    public void setVersion(Long version) { this.version = version; }
    public LocalDateTime getCreatedAt() { return createdAt; }
    public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
    public LocalDateTime getUpdatedAt() { return updatedAt; }
    public void setUpdatedAt(LocalDateTime updatedAt) { this.updatedAt = updatedAt; }
}
