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 模拟操作 attempt 实体。记录每次执行或重试的请求、响应和结果。
 */
@TableName("workflow_reservation_opera_operation_attempt")
public class ReservationOperaOperationAttemptEntity {

    /** OPERA 模拟操作 attempt ID。 */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /** 酒店或业务上下文 ID。 */
    private String hotelId;
    /** 关联订单 ID。 */
    private Long orderId;
    /** 关联任务 ID。 */
    private Long taskId;
    /** 关联 OPERA 模拟操作 ID。 */
    private Long operationId;
    /** 同一操作内第几次 attempt，从 1 开始。 */
    private Integer attemptNumber;
    /** attempt 状态：SUCCEEDED、FAILED。 */
    private String attemptStatus;
    /** 本次模拟请求 JSON。 */
    private String requestPayloadJson;
    /** 本次模拟响应 JSON。 */
    private String responsePayloadJson;
    /** 失败原因摘要。 */
    private String errorMessage;
    /** attempt 开始 UTC 时间。 */
    private LocalDateTime startedAt;
    /** attempt 结束 UTC 时间。 */
    private LocalDateTime finishedAt;
    /** 记录创建 UTC 时间。 */
    private LocalDateTime createdAt;

    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 Long getOperationId() { return operationId; }
    public void setOperationId(Long operationId) { this.operationId = operationId; }
    public Integer getAttemptNumber() { return attemptNumber; }
    public void setAttemptNumber(Integer attemptNumber) { this.attemptNumber = attemptNumber; }
    public String getAttemptStatus() { return attemptStatus; }
    public void setAttemptStatus(String attemptStatus) { this.attemptStatus = attemptStatus; }
    public String getRequestPayloadJson() { return requestPayloadJson; }
    public void setRequestPayloadJson(String requestPayloadJson) { this.requestPayloadJson = requestPayloadJson; }
    public String getResponsePayloadJson() { return responsePayloadJson; }
    public void setResponsePayloadJson(String responsePayloadJson) { this.responsePayloadJson = responsePayloadJson; }
    public String getErrorMessage() { return errorMessage; }
    public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; }
    public LocalDateTime getStartedAt() { return startedAt; }
    public void setStartedAt(LocalDateTime startedAt) { this.startedAt = startedAt; }
    public LocalDateTime getFinishedAt() { return finishedAt; }
    public void setFinishedAt(LocalDateTime finishedAt) { this.finishedAt = finishedAt; }
    public LocalDateTime getCreatedAt() { return createdAt; }
    public void setCreatedAt(LocalDateTime createdAt) { this.createdAt = createdAt; }
}
