package com.red.circle.live.infra.repository.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.red.circle.framework.dto.DTO;
import java.io.Serial;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 刷新在线用户 通知.
 *
 * @author pengliang on 2024/1/9
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class RefreshOnlineUserNoticeDTO extends DTO {

  @Serial
  private static final long serialVersionUID = 1L;

  /**
   * 时序id.
   */
  private String timeId;

  /**
   * 在线数量.
   */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long onlineSize;

  /**
   * 类型.
   */
  private RefreshOnlineUserType type;

  /**
   * 麦克风.
   */
  private Object body;


  public enum RefreshOnlineUserType {

    /**
     * 系统长时间未收到心跳, 移除.
     */
    KILL
  }

}
