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 OPERA 模拟操作实体。保存任务确认后生成的固定模拟操作及当前状态。
 */
@TableName("workflow_reservation_opera_operation")
public class ReservationOperaOperationEntity {

    /** OPERA 模拟操作 ID。 */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /** 酒店或业务上下文 ID。 */
    private String hotelId;
    /** 关联订单 ID。 */
    private Long orderId;
    /** 关联任务 ID。 */
    private Long taskId;
    /** 任务内模拟操作顺序，从 1 开始。 */
    private Integer operationSequence;
    /** 模拟操作代码，第一版固定两类。 */
    private String operationCode;
    /** 模拟操作展示名称。 */
    private String operationName;
    /** 操作状态：PENDING、SUCCEEDED、FAILED。 */
    private String operationStatus;
    /** 模拟请求 JSON，来源于确认 payload 的低耦合摘要。 */
    private String requestPayloadJson;
    /** 已执行 attempt 次数。 */
    private Integer attemptCount;
    /** 最近一次 attempt ID。 */
    private Long lastAttemptId;
    /** 最近一次失败原因摘要。 */
    private String lastErrorMessage;
    /** 记录创建 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 getTaskId() { return taskId; }
    public void setTaskId(Long taskId) { this.taskId = taskId; }
    public Integer getOperationSequence() { return operationSequence; }
    public void setOperationSequence(Integer operationSequence) { this.operationSequence = operationSequence; }
    public String getOperationCode() { return operationCode; }
    public void setOperationCode(String operationCode) { this.operationCode = operationCode; }
    public String getOperationName() { return operationName; }
    public void setOperationName(String operationName) { this.operationName = operationName; }
    public String getOperationStatus() { return operationStatus; }
    public void setOperationStatus(String operationStatus) { this.operationStatus = operationStatus; }
    public String getRequestPayloadJson() { return requestPayloadJson; }
    public void setRequestPayloadJson(String requestPayloadJson) { this.requestPayloadJson = requestPayloadJson; }
    public Integer getAttemptCount() { return attemptCount; }
    public void setAttemptCount(Integer attemptCount) { this.attemptCount = attemptCount; }
    public Long getLastAttemptId() { return lastAttemptId; }
    public void setLastAttemptId(Long lastAttemptId) { this.lastAttemptId = lastAttemptId; }
    public String getLastErrorMessage() { return lastErrorMessage; }
    public void setLastErrorMessage(String lastErrorMessage) { this.lastErrorMessage = lastErrorMessage; }
    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; }
}
