package com.kexue.skills.entity;

import java.math.BigDecimal;
import java.util.Date;

import java.io.Serializable;
import com.kexue.skills.entity.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * (AccountFrozen)实体类
 * 账户冻结单
 *
 * @author 系统生成
 * @since 2026-04-11
 */
@Data
public class AccountFrozen extends BaseEntity implements Serializable  {
    private static final long serialVersionUID = 1L;

        @Schema(description ="冻结单ID，字符型")
        private String frozenId;

        @Schema(description ="流水ID")
        private String accountTransactionId;

        @Schema(description ="用户ID，关联冻结单")
        private Long userId;

        @Schema(description ="调用ID，关联冻结单")
        private String callId;

        @Schema(description ="会话ID")
        private String sessionId;

        @Schema(description ="模型名称")
        private String modelName;

        @Schema(description ="对应回答的问题或需求")
        private String question;

        @Schema(description ="冻结金额/张数/次数/分钟")
        private BigDecimal frozenAmount;

        @Schema(description ="冻结类型：1.token 2.RMB(元) 99其他")
        private Integer frozenType;

        @Schema(description ="最终扣减，0=释放")
        private BigDecimal finalAmount;

        @Schema(description ="输入tokens")
        private Long usageInputTokens;

        @Schema(description ="输出tokens")
        private Long usageOutputTokens;

        @Schema(description ="总tokens")
        private Long usageTotalTokens;

        @Schema(description ="终结原因：success/cancel/timeout/error/system_recovery")
        private String finalizeReason;

        @Schema(description ="状态：RESERVED 已预留，FINALIZED 已终结")
        private String status;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @Schema(description ="过期时间")
        private Date expireAt;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @Schema(description ="创建时间")
        private Date createTime;

        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @Schema(description ="更新时间")
        private Date updateTime;

}
