package com.it.rattan.monisuo.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 资金流水实体类
 */
@Data
@TableName("account_flow")
public class AccountFlow implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;

    /** 用户ID */
    private Long userId;

    /** 流水号 */
    private String flowNo;

    /** 流水类型: 1-充值 2-提现 3-划转转入 4-划转转出 5-买入 6-卖出 */
    private Integer flowType;

    /** 变动金额 */
    private BigDecimal amount;

    /** 变动前余额 */
    private BigDecimal balanceBefore;

    /** 变动后余额 */
    private BigDecimal balanceAfter;

    /** 相关币种 */
    private String coinCode;

    /** 关联订单号 */
    private String relatedOrderNo;

    /** 备注 */
    private String remark;

    /** 创建时间 */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
}
