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.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;
import java.util.Map;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 用户金币流水分析.
 *
 * @author pengliang on 2022/11/17
 */
@Data
@Accessors(chain = true)
@Document("currency_analyze_user_log")
public class CurrencyAnalyzeUserLog implements Serializable {

  @Serial
  private static final long serialVersionUID = 1L;

  @Id
  private String id;

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

  /**
   * 归属系统.
   */
  private String sysOrigin;

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

  /**
   * 每项数量.
   */
  private Map<Integer, BigDecimal> groupTypeQuantity;

  /**
   * 统计日期.
   */
  private Integer dateNumber;

  /**
   * 分析来源.
   */
  private List<CurrencyAnalyzeUserLogItem> items;

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

}
