package com.red.circle.other.infra.database.mongo.entity.activity;

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

/**
 * 排名统计.
 *
 * @author pengliang on 2022/02/14
 */
@Data
@Accessors(chain = true)
@Document("ranking_count")
@FieldDefaults(level = AccessLevel.PRIVATE)
public class RankingCount implements Serializable {

  private static final long serialVersionUID = 1L;

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

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

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

  /**
   * 类型.
   */
  RankingCountType type;

  /**
   * 分组.
   */
  String group;

  /**
   * 数量.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  Long quantity;

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

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

}
