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

import com.red.circle.framework.dto.IResponseErrorCode;
import com.red.circle.framework.dto.ResErrorCode;

/**
 * 业务状态码范围： 9000 ~ 9500
 *
 * @author pengliang on 2023/6/10
 */
@ResErrorCode(describe = "房间相关", minCode = 9000, maxCode = 9500)
public enum RoomErrorCode implements IResponseErrorCode {

  /**
   * 房间已存在.
   */
  ROOM_EXISTS(9000, "Room exists"),

  /**
   * 房间不存在.
   */
  ROOM_NOT_EXISTS(9001, "Room not exists"),

  /**
   * 房间不存在用户.
   */
  ROOM_NOT_USER(9002, "Room not user"),

  /**
   * 用户在黑名单中.
   */
  USER_IS_BLACKLIST(9003, "User is blacklist"),

  /**
   * 已达到成员上限.
   */
  ROOM_MEMBER_IS_MAX(9004, "Room member is max"),

  /**
   * 密码不正确.
   */
  PASSWORD_NOT_TRUE(9005, "Password not true"),

  /**
   * 经验值超过限制.
   */
  PROGRESS_EXCEED_LIMIT(9006, "Progress exceed limit"),

  /**
   * 关系已存在.
   */
  RELATIONSHIP_ALREADY_EXISTS(9007, "Relationship already exists"),

  /**
   * 没有找到房间贡献.
   */
  NOT_FOUND_CONTRIBUTION(9008, "Not found room contribution."),

  /**
   * 提现最小额.
   */
  MINIMUM_WITHDRAWAL(9009, "Must meet the minimum withdrawal amount."),
  /**
   * 游戏不存在.
   */
  GAME_NOT_EXIST(9100, "game not exist"),

  /**
   * 游戏已被创建.
   */
  GAME_IS_CREATE(9101, "game is create"),
  /**
   * 游戏进行中.
   */
  GAME_PROCESSING(9102, "game processing"),
  /**
   * 游戏已结束.
   */
  GAME_COMPLETE(9103, "game complete"),
  /**
   * 游戏人数已满.
   */
  GAME_THE_NUMBER_FULL(9104, "game The number is full"),
  /**
   * 已加入游戏.
   */
  GAME_JOINED(9105, "game joined"),
  /**
   * 开始游戏必须是发起者.
   */
  START_GAME_MUST_SPONSOR(9106, "Must be the initiator to start the game"),

  /**
   * 管理人员数量已用完.
   */
  ROOM_ADMIN_OVERFLOW(9107, "The number of management staff has been used up"),
  /**
   * 用户已参加活动，不能被邀请.
   */
  HAVE_PARTICIPATED_NOT_INVITED(9108,
      "The user has participated in the event and cannot be invited"),

  /**
   * 已加入成员列表.
   */
  JOINED_THE_MEMBER_LIST(9109, "Joined the member list"),

  /**
   * 请购买房间锁.
   */
  PLEASE_BUY_ROOM_LOCK(9110, "Please buy a room lock"),

  /**
   * 房间资料缺失.
   */
  ROOM_INFO_MISSING(9111, "Room information is missing"),

  /**
   * 无权进入.
   */
  NO_RIGHT_TO_ENTER(9112, "No right to enter"),

  /**
   * 资金不足无法启动游戏.
   */
  INSUFFICIENT_FUNDS(9113, "Insufficient funds to start the game"),

  /**
   * 房间已关闭.
   */
  ROOM_CLOSE(9114, "Room close"),

    /**
     * 不是房间拥有者
     */
    NOT_ROOM_OWNER(9115, "Not the owner of the room"),

    /**
     * 房间贡献奖励不存在
     */
    ROOM_CONTRIBUTION_NOT_FOUND(9116, "There is no room contribution reward"),

    /**
     * 房间贡献奖励未达标
     */
    ROOM_CONTRIBUTION_NOT_COMPLETED(9117, "The room reward has not been completed"),
    ;

  private final int code;
  private final String message;

  RoomErrorCode(int code, String message) {
    this.code = code;
    this.message = message;
  }

  @Override
  public Integer getCode() {
    return this.code;
  }

  @Override
  public String getMessage() {
    return this.message;
  }

  @Override
  public String getErrorCodeName() {
    return this.name();
  }

}
