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 订单实体。承载业务订单号、临时订单和任务队列归属。
 */
@TableName("workflow_reservation_order")
public class ReservationOrderEntity {

    /** 系统内部订单 ID。 */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /** 酒店或业务上下文 ID。 */
    private String hotelId;
    /** 业务号类型。 */
    private String orderKeyType;
    /** 真实业务号，例如 Group Code 或 Confirmation Number。 */
    private String orderBusinessKey;
    /** ACTIVE 业务订单唯一约束辅助键，非 ACTIVE 或临时订单为空。 */
    private String activeBusinessKey;
    /** 临时订单展示编号。 */
    private String temporaryOrderCode;
    /** 订单状态。 */
    private String orderStatus;
    /** 订单前端可见性，系统隐藏订单不进入订单列表。 */
    private String orderVisibility;
    /** 业务号来源，例如 AI 候选、用户确认或 OPERA 模拟回填。 */
    private String businessKeySource;
    /** New Booking 成功后回填真实业务号的 UTC 时间。 */
    private LocalDateTime businessKeyBackfilledAt;
    /** 前端展示名称。 */
    private String displayName;
    /** 首次创建该订单的来源消息 ID。 */
    private Long sourceMessageId;
    /** 首次创建该订单的任务 ID，CP1-3 允许为空。 */
    private Long createdFromTaskId;
    /** 订单进入 ENDED 状态的 UTC 时间。 */
    private LocalDateTime endedAt;
    /** 逻辑删除 UTC 时间。 */
    private LocalDateTime logicDeletedAt;
    /** 逻辑删除原因。 */
    private String logicDeletedReason;
    /** 乐观锁版本。 */
    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 String getOrderKeyType() { return orderKeyType; }
    public void setOrderKeyType(String orderKeyType) { this.orderKeyType = orderKeyType; }
    public String getOrderBusinessKey() { return orderBusinessKey; }
    public void setOrderBusinessKey(String orderBusinessKey) { this.orderBusinessKey = orderBusinessKey; }
    public String getActiveBusinessKey() { return activeBusinessKey; }
    public void setActiveBusinessKey(String activeBusinessKey) { this.activeBusinessKey = activeBusinessKey; }
    public String getTemporaryOrderCode() { return temporaryOrderCode; }
    public void setTemporaryOrderCode(String temporaryOrderCode) { this.temporaryOrderCode = temporaryOrderCode; }
    public String getOrderStatus() { return orderStatus; }
    public void setOrderStatus(String orderStatus) { this.orderStatus = orderStatus; }
    public String getOrderVisibility() { return orderVisibility; }
    public void setOrderVisibility(String orderVisibility) { this.orderVisibility = orderVisibility; }
    public String getBusinessKeySource() { return businessKeySource; }
    public void setBusinessKeySource(String businessKeySource) { this.businessKeySource = businessKeySource; }
    public LocalDateTime getBusinessKeyBackfilledAt() { return businessKeyBackfilledAt; }
    public void setBusinessKeyBackfilledAt(LocalDateTime businessKeyBackfilledAt) { this.businessKeyBackfilledAt = businessKeyBackfilledAt; }
    public String getDisplayName() { return displayName; }
    public void setDisplayName(String displayName) { this.displayName = displayName; }
    public Long getSourceMessageId() { return sourceMessageId; }
    public void setSourceMessageId(Long sourceMessageId) { this.sourceMessageId = sourceMessageId; }
    public Long getCreatedFromTaskId() { return createdFromTaskId; }
    public void setCreatedFromTaskId(Long createdFromTaskId) { this.createdFromTaskId = createdFromTaskId; }
    public LocalDateTime getEndedAt() { return endedAt; }
    public void setEndedAt(LocalDateTime endedAt) { this.endedAt = endedAt; }
    public LocalDateTime getLogicDeletedAt() { return logicDeletedAt; }
    public void setLogicDeletedAt(LocalDateTime logicDeletedAt) { this.logicDeletedAt = logicDeletedAt; }
    public String getLogicDeletedReason() { return logicDeletedReason; }
    public void setLogicDeletedReason(String logicDeletedReason) { this.logicDeletedReason = logicDeletedReason; }
    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; }
}
