package com.seer.teach.pay.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.seer.teach.common.entity.BaseEntity;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 用户账户交易明细表
 * </p>
 *
 * @author Wang
 * @since 2025-06-25 16:25:06
 */
@Getter
@Setter
@TableName("pay_coin_account_trade_log")
@Schema(name = "UserCoinAccountTradeLogEntity对象", description = "用户账户交易明细表")
public class PayCoinAccountTradeLogEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Schema(description = "用户ID")
    @TableField("user_id")
    private Integer userId;

    @Schema(description = "交易类型: 1-充值，2-微信退款, 3-兑换, 4-购买, 5-退货")
    @TableField("trade_type")
    private Integer tradeType;

    @Schema(description = "交易名称")
    @TableField("trade_name")
    private String tradeName;

    @Schema(description = "交易时间")
    @TableField("trade_time")
    private LocalDateTime tradeTime;

    @Schema(description = "关联业务ID（如课程ID、订单ID）")
    @TableField("related_id")
    private Integer relatedId;

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

    @Schema(description = "交易金额")
    @TableField("trade_amount")
    private BigDecimal tradeAmount;

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

    @Schema(description = "备注信息")
    @TableField("remark")
    private String remark;


}