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;

/**
 * (AccountTransaction)实体类
 * 账户流水表，记录用户的账户交易记录
 *
 * @author 王志维
 * @since 2025-02-21 23:01:48
 */
@Data
public class AccountTransaction extends BaseEntity implements Serializable  {
    private static final long serialVersionUID = 1L;

        @Schema(description ="主键ID")
        private Long transactionId;

        @Schema(description ="用户ID")
        private Long userId;

        @Schema(description ="用户名")
        private String userName;

        @Schema(description ="交易类型：1.充值 2.提现 3.购买内容 4.退款 5.签到奖励 6.赠送 7.其他")
        private Integer transactionType;

        @Schema(description ="交易金额")
        private BigDecimal amount;

        @Schema(description ="交易前余额")
        private BigDecimal beforeBalance;

        @Schema(description ="交易后余额")
        private BigDecimal afterBalance;

        @Schema(description ="交易状态：1.成功 2.失败 3.处理中")
        private Integer status;

        @Schema(description ="交易单号")
        private String transactionNo;

        @Schema(description ="支付方式：1.微信 2.支付宝 3.余额支付")
        private Integer payType;

        @Schema(description ="关联业务ID")
        private Long businessId;

        @Schema(description ="业务类型")
        private String businessType;

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

        @Schema(description ="交易备注")
        private String remark;

        @Schema(description ="是否支出：1.是 0.否")
        private Integer isExpense;

        @Schema(description ="输入token")
        private Integer inputToken;

        @Schema(description ="输出token")
        private Integer outputToken;

        @Schema(description ="合计tokens")
        private Integer totalTokens;

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

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

        @Schema(description ="收入类型：recharge(充值)、sign_in(签到奖励)")
        private String incomeType;

        @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;

        @Schema(description ="创建人")
        private String createBy;

        @Schema(description ="更新人")
        private String updateBy;

        @Schema(description ="是否删除 ：0 未删除，1已删除")
        private Integer deleteFlag;

}