package com.red.circle.console.infra.database.mongo.count.entity;

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

/**
 * <p>
 * 用户金币流水.
 * </p>
 *
 * @author pengliang
 * @since 2019-12-07
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Document("user_gold_running_water_v2")
public class UserGoldRunningWater implements Serializable {

  private static final long serialVersionUID = 1L;

  /**
   * 主键ID.
   */
  @Id
  @JsonSerialize(using = ToStringSerializer.class)
  private Long id;

  /**
   * 系统来源.
   */
  private String sysOrigin;

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

  /**
   * 金币数量.
   */
  private BigDecimal quantity;

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

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

  /**
   * 类型0.收入 1.消耗.
   */
  private Integer type;

  /**
   * 来源.
   */
  private String origin;

  /**
   * 来源名称.
   */
  private String originName;

  /**
   * 状态.
   */
  private String status;

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

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

  /**
   * 后台操作用户id.
   */
  private Long backOperationUser;

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

  /**
   * 过期时间.
   */
  private Timestamp expiredTime;

}
