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 com.red.circle.other.inner.enums.activity.KingQueenType;
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.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 每周king&queen统计.
 *
 * @author pengliang on 2021/12/29
 */
@Data
@Accessors(chain = true)
@Document("week_king_queen_count")
@FieldDefaults(level = AccessLevel.PRIVATE)
public class WeekKingQueenCount 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;

  /**
   * 用户性别:0 女，1 男.
   */
  Integer userSex;

  /**
   * 排名
   */
  @Transient
  Integer rank;

  /**
   * 类型.
   */
  KingQueenType type;

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

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

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

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

}
