package com.red.circle.live.app.dto.cmd;

import com.red.circle.common.business.dto.cmd.AppExtCommand;
import jakarta.validation.constraints.NotNull;
import java.util.Objects;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 上下麦克风参数.
 *
 * @author pengliang on 2023/12/8
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class MicUpDownCmd extends AppExtCommand {

  /**
   * 房间id.
   *
   * @eo.required
   */
  @NotNull(message = "roomId required.")
  private Long roomId;

  /**
   * 位置索引.
   *
   * @eo.required
   */
  @NotNull(message = "mickIndex required.")
  private Integer mickIndex;

  /**
   * 邀请人ID
   */
  private Long inviterId;

  /**
   * 事件类型.
   */
  private MicUpEventType eventType;


  public boolean eventTypeEqInvite() {
    return Objects.equals(eventType, MicUpEventType.INVITE);
  }

}
