package com.red.circle.other.inner.model.dto.live;

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;

/**
 * 房间黑名单用户.
 *
 * @author houyong on 2020/12/3
 * @since pengliang 2022-9-19
 */
@Data
@Accessors(chain = true)
@FieldDefaults(level = AccessLevel.PRIVATE)
public class RoomUserBlacklistDTO implements Serializable {

  private static final long serialVersionUID = 1L;

  /**
   * 唯一id.
   */
  String id;

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

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

  /**
   * 被拉黑用户id.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  Long userId;

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

  /**
   * 创建人角色.
   */
  String createUserRoles;

  /**
   * 创建用户.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  Long createUser;

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

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

  public void generatorId() {
    this.id = this.roomId + "_" + this.userId;
  }

}
