package com.red.circle.other.inner.tmp;

import jakarta.validation.constraints.NotNull;
import java.util.Objects;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author houyong
 * @since 2019/12/4
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class UpdateRoomSettingRestApiCmd extends CommonOtherRestApiCmd {

  /**
   * 房间id.
   */
  @NotNull(message = "roomId {not.null}")
  private Long roomId;

  /**
   * 房间密码.
   */
  private String password;

  /**
   * 游客上麦 false.不允许 true.允许.
   */
  private Boolean touristMike;

  /**
   * 麦克风权限:RoomTakeMicRoleEnum
   */
  private String takeMicRole;

  /**
   * 游客发消息.
   */
  private Boolean touristMsg;

  /**
   * 加入房间所需金币.
   */
  private Integer joinGolds;

  /**
   * 麦克风数量.
   */
  private Integer mikeSize;

  /**
   * 是否允许播放音乐 0.不允许 1.允许.
   */
  private Boolean allowMusic;

  /**
   * 管理员锁麦克风 0.不允许 1.允许.
   */
  private Boolean adminLockSeat;

  /**
   * 是否显示心动值 0.不显示 1.显示.
   */
  private Boolean showHeartbeat;

  /**
   * 活动房间特殊麦位类型
   */
  private String roomSpecialMikeType;

  /**
   * 是否开启KTV模式.
   */
  private Boolean openKtvMode;


  public boolean checkJoinGoldsIsPass() {
    return Objects.nonNull(joinGolds) && joinGolds >= 0 && joinGolds <= 4000;
  }
}
