package com.red.circle.other.infra.database.mongo.entity.user.profile;

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 java.util.Map;
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/2/16
 */
@Data
@Accessors(chain = true)
@Document("user_special_id")
@FieldDefaults(level = AccessLevel.PRIVATE)
public class UserSpecialId implements Serializable {

  @Serial
  private static final long serialVersionUID = 1L;

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

  /**
   * 时序id.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  Long timeId;

  /**
   * 归属系统.
   */
  String sysOrigin;

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

  /**
   * 号码.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  String account;

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

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

  /**
   * 修改时间.
   */
  Timestamp updateTime;

  /**
   * 最近操用户.
   */
  Long latestOptUserId;

  /**
   * 自定义字段.
   */
  Map<String, String> customizeField;

}
