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.math.BigDecimal;
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 2022/10/25
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@Document("room_contribution_activity_count")
@FieldDefaults(level = AccessLevel.PRIVATE)
public class RoomContributionActivityCount extends Convert implements Serializable {

  @Serial
  private static final long serialVersionUID = 1L;

  /**
   * 记录id.
   */
  @Id
  String id;

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

  /**
   * 周贡献值.
   */
  BigDecimal contributionValue;

  /**
   * 时间.
   */
  Integer dateNumber;

  /**
   * 时间(true=已领取).
   */
  Boolean received;

  /**
   * 奖励金币是否已发放.
   */
  Boolean rewardCoinsSent;

  /**
   * 比例.
   */
  BigDecimal ratio;

  /**
   * 可提取金币数量.
   */
  BigDecimal balance;

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

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

}
