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.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 周星礼物统计.
 *
 * @author pengliang on 2021/8/13
 */
@Data
@Accessors(chain = true)
@Document("week_star_gift_count")
@FieldDefaults(level = AccessLevel.PRIVATE)
public class WeekStarGiftCount 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;

  /**
   * 礼物id.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  Long giftId;

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

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

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

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

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

}
