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.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_balance")
public class UserBankBalance implements Serializable {

  @Serial
  private static final long serialVersionUID = 1L;

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

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

  /**
   * 获得总额.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long earnPoints;

  /**
   * 消费总额.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long consumptionPoints;

  /**
   * 余额.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long balance;

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

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

}
