package com.red.circle.wallet.infra.database.mongo.entity.bank;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 用户银行卡 流水.
 *
 * @author pengliang on 2023/2/15
 */
@Data
@Accessors(chain = true)
@Document("user_bank_running_water")
public class UserBankRunningWater implements Serializable {

  @Serial
  private static final long serialVersionUID = 1L;

  /**
   * 记录id.
   */
  @Id
  @JsonSerialize(using = ToStringSerializer.class)
  private Long id;

  /**
   * 用户id.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long userId;

  /**
   * 归属平台.
   */
  private String sysOrigin;

  /**
   * 收支类型(0.收入 1.支出)
   */
  private Integer type;

  /**
   * 金额.
   */
  private BigDecimal amount;

  /**
   * 提现手续费比例.
   */
  private Long serviceCharge;

  /**
   * 实际提现金额.
   */
  private BigDecimal actualAmount;

  /**
   * 事件 UserBankWaterEvent.
   */
  private String event;

  /**
   * 事件描述.
   */
  private String eventDescribe;

  /**
   * 备注.
   */
  private String remark;

  /**
   * 跟踪id.
   */
  private String trackId;

  /**
   * 余额.
   */
  private BigDecimal balance;

  /**
   * 创建时间.
   */
  private Timestamp createTime;

  /**
   * 修改时间.
   */
  private Timestamp updateTime;

  /**
   * 创建用户.
   */
  private Long createUser;

  /**
   * 创建用户来源：0 app、1 后台.
   */
  private Integer createUserOrigin;

}
