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

import cn.hutool.core.convert.Convert;
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.sql.Timestamp;
import lombok.AccessLevel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 房间粉丝人气票活动.
 *
 * @author pengshigang on 2023/6/9
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@Document("room_fan_votes_activity_count")
@FieldDefaults(level = AccessLevel.PRIVATE)
public class RoomFanVotesActivityCount extends Convert implements Serializable {

  @Serial
  private static final long serialVersionUID = 1L;

  /**
   * roomId_dateNumber.
   */
  @Id
  String id;

  /**
   * 区域Code(根据最后一次收礼物的区域而变化).
   */
  String regionCode;

  /**
   * 房间ID.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  Long roomId;

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

  /**
   * 积分.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  Long points;

  /**
   * 沙特时间年月日:20230609.
   */
  Integer dateNumber;

  /**
   * 是否为历史(true 历史).
   */
  Boolean history;

  /**
   * 是否已经发送奖励(true 是)
   */
  Boolean alreadySent;

  /**
   * 是否已删除(true 是)
   */
  Boolean del;

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

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

}
