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


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

/**
 * 游戏code: 8100~8300.
 *
 * @author pengliang 2021/5/17
 */
@ResErrorCode(describe = "游戏code", minCode = 8100, maxCode = 8300)
public enum GameErrorCode implements IResponseErrorCode {

  /**
   * 没有找到红包信息.
   */
  NOT_FOUND_RED_PACKET(8100, "No red packet information found"),

  /**
   * 没有游戏信息.
   */
  NOT_GAME_INFORMATION(8101, "No game information"),

  /**
   * 没有中奖记录.
   */
  NO_RECORD_OF_WINNING(8102, "No record of winning"),

  /**
   * 已押注.
   */
  GAME_BET(8103, "Game bet"),

  /**
   * 游戏不存在.
   */
  GAME_NOT_EXIST(8104, "Game does not exist"),

  /**
   * 游戏已开始.
   */
  GAME_HAS_STARTED(8105, "The game has started"),

  /**
   * 无法加入游戏.
   */
  CANNOT_JOIN_GAME(8106, "Cannot join game"),

  /**
   * 游戏人数已满.
   */
  GAME_NUMBER_FULL(8107, "The number is full"),

  /**
   * 游戏已创建.
   */
  GAME_CREATED(8108, "Game created"),

  /**
   * 已加入游戏.
   */
  HAS_JOINED_GAME(8109, "Has joined the game"),

  /**
   * 没有找到胜利者.
   */
  NO_WINNER_FOUND(8110, "No winner found"),

  /**
   * 游戏人数不足.
   */
  INSUFFICIENT_PLAYERS(8111, "Insufficient players"),

  /**
   * 当前房间已存在创建的游戏.
   */
  GAME_REPEAT(8112, "There are already created games in the current room"),

  /**
   * 你当前的游戏未结束，不能加入新的游戏.
   */
  YOUR_GAME_NOT_OVER(8113, "Your current game is not over yet, you cannot join temporarily"),

  /**
   * 游戏已结束.
   */
  GAME_OVER(8114, "Game is over"),

  /**
   * 没有碎片，不能兑换.
   */
  MISSING_FRAGMENTS_ERROR(8116, "Not enough fragments to exchange for props"),

  /**
   * 道具不存在，碎片无效.
   */
  SHARDS_INVALID_ERROR(8117, "The prop does not exist, the prop fragment is invalid"),

  /**
   * 道具库存不足，请联系管理员.
   */
  INVENTORY_SHORTAGE_ERROR(8118, "Insufficient item inventory, please contact the administrator"),

  /**
   * 游戏已结束或已开始新游戏.
   */
  GAME_OVER_OR_NEW_GAME(8119, "The game has ended or a new game has started"),

  /**
   * 请等待下一局游戏.
   */
  WAIT_NEXT_GAME(8120, "Please wait for the next game"),

  /**
   * 没有找到游戏记录.
   */
  NO_GAME_RECORD_FOUND(8121, "No game record found"),

  /**
   * 不能重复投票.
   */
  NOT_REPEATEDLY_VOTE_ERROR(8122, "Do not vote repeatedly"),

  /**
   * 押注失败.
   */
  BET_LOST(8123, "bet lost"),

  /**
   * 你与发起人处于同一房间，无法接受游戏.
   */
  SAME_ROOM_UNACCEPTABLE_ERROR(8124,
      "You are in the same room as the creator of the game and cannot accept the game"),

  /**
   * 没有权限.
   */
  PERMISSION_DENIED(8125, "permission denied"),

  /**
   * 游戏状态不在进行中.
   */
  GAME_STATE_NOT_PROGRESS(8126, "Game state is not in progress"),

  /**
   * 游戏创建存在抢占.
   */
  GAME_CREATE_SEIZE(8127, "Game create seize"),

  /**
   * 群组创建失败.
   */
  GROUP_CREATE_FAIL(8128, "Group Create fail"),

  /**
   * 正在押注.
   */
  BETTING(8129, "betting"),

  /**
   * 已领取.
   */
  RECEIVED(8130, "received"),

  /**
   * 已经达到了上限.
   */
  TOP_LIMIT_ERROR(8131, "We have reached the upper limit"),

  /**
   * 最多输入一百个字.
   */
  TEXT_LONGER_THAN_ERROR(8132, "Enter up to 100 characters"),

  /**
   * 未配置规则.
   */
  RULE_NOT_CONFIGURED(8133, "Rule not configured"),

  /**
   * 未配置下注金额.
   */
  THE_BET_AMOUNT_IS_NOT_CONFIGURED(8134, "The bet amount is not configured"),

  /**
   * 奖品未完善.
   */
  INCOMPLETE_PRIZE(8135, "Incomplete prize"),

  /**
   * 游戏已下架
   */
  THE_GAME_HAS_BEEN_TAKEN_DOWN(8136, "The game has been taken down"),

  /**
   * 当前不是开奖时间
   */
  NOT_LOTTERY_TIME(8137, "This is not a drawing time"),

  /**
   * 今日已打卡.
   */
  CHECKED_IN(8138, "Checked in today"),

  /**
   * 用户已存在.
   */
  USER_ALREADY_EXISTS(8139, "User already exists"),

  ;

  private final Integer code;
  private final String message;

  GameErrorCode(Integer code, String message) {
    this.code = code;
    this.message = message;
  }

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

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

  @Override
  public String getErrorCodeName() {
    return null;
  }

}
