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


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

/**
 * 团队相关业务code.
 *
 * @author pengliang on 2019/10/19 23:25
 */
@ResErrorCode(describe = "团队相关", minCode = 6000, maxCode = 6200)
public enum TeamErrorCode implements IResponseErrorCode {

  /**
   * 已加入团队.
   */
  JOINED_TEAM(6001, "Joined the team"),

  /**
   * 团队不存在.
   */
  TEAM_NOT_FOUND(6010, "The team does not exist or has been disbanded"),

  /**
   * 余额不足.
   */
  INSUFFICIENT_BALANCE(6012, "Insufficient balance"),

  /**
   * 消费不符.
   */
  CONSUMPTION_DOES_NOT_CORRESPOND(6013, "Consumption does not correspond"),

  /**
   * 没有账单.
   */
  NO_BILL(6014, "No bill"),

  /**
   * 团队已满.
   */
  THE_TEAM_IS_FULL(6015, "The team is full"),

  /**
   * 相关依赖.
   */
  INTERDEPENDENCE(6016, "Interdependence"),

  /**
   * 提取参数错.
   */
  EXTRACTION_PARAMETER_ERROR(6017, "Extraction parameter error"),

  /**
   * 没有在cacoo出现过.
   */
  NOT_CACOO_APPEAR(6018, "Not Cacoo appear"),

  /**
   * 无法加入我的团队，自己不可以添加自己.
   */
  CANNOT_JOIN_MY_TEAM(6019, "Cannot join my team"),

  /**
   * 用户已经是代理.
   */
  USER_IS_ALREADY_A_AGENT(6020, "User is already a Agent"),

  /**
   * 用户已经是主播.
   */
  USER_IS_ALREADY_A_ANCHOR(6021, "User is already a Anchor"),

  /**
   * 消息已发送.
   */
  MESSAGE_SENT(6022, "message sent"),

  /**
   * 消息已处理.
   */
  MESSAGE_PROCESSED(6023, "Message processed"),

  /**
   * 用户正在申请加入其他代理.
   */
  USER_APPLY_JOIN_OTHER_AGENT(6024, "The user is applying to join another agent"),

  /**
   * 不是团队成员.
   */
  NOT_TEAM_MEMBER(6025, "not a team member"),

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

  /**
   * 银行卡重复.
   */
  BANK_CARD_REPEAT_ERROR(6027, "Duplicate bank card number and type"),

  /**
   * 用户已经是BD.
   */
  USER_IS_ALREADY_A_BD(6028, "User is already a BD"),

  /**
   * 用户不是BD.
   */
  USER_IS_NOT_BD(6029, "User is not BD"),

  /**
   * 邀请失败，请联系管理员.
   */
  INVITATION_FAILED(6030, "The invitation failed. Please contact the administrator"),

  /**
   * 管理员上限.
   */
  ADMIN_LIMIT(6031, "Admin limit"),

  /**
   * 加入限制.
   */
  JOIN_RESTRICTIONS(6032, "join restrictions"),

  /**
   * 用户是BD.
   */
  USER_IS_BD(6033, "User is BD"),

  /**
   * 不能邀请用户,请联系管理员.
   */
  NOT_INVITE_USER_ERROR(6034, "Unable to invite him, please contact the administrator"),

  /**
   * 不可领取.
   */
  UNCLAIMABLE(6035, "Not available for collection"),

  /**
   * 无权加入.
   */
  NOT_AUTHORIZED_TO_JOIN(6036, "Not authorized to join"),

  /**
   * 团队已关闭
   */
  TEAM_CLOSE_ERROR(6037, "Team is closed"),

  /**
   * 团队人数已达到上限
   */
  TEAM_MEMBER_FULL_ERROR(6038, "The team has reached its maximum size"),

  /**
   * 没有找到已发布政策
   */
  NOT_FOUND_RELEASE_POLICY(6039, "No published policy found"),

  /**
   * 账单不存在
   */
  BILL_DOES_NOT_EXIST(6040, "Bill does not exist"),

  /**
   * 用户已是团队成员
   */
  USER_ALREADY_TEAM_MEMBER(6041, "The user is already a team member"),

  /**
   * 用户已是团长
   */
  USER_ALREADY_TEAM_OWN(6042, "The user is already the host"),

  /**
   * 用户已存在BD列表
   */
  USER_EXISTS_BD_ERROR(6043, "The user already has a BD list"),

  /**
   * 用户不是BD身份
   */
  USER_BD_ROLE_INVALID_ERROR(6044, "User is not a BD identity"),

  /**
   * 用户不是代理身份
   */
  USER_AGENT_ROLE_INVALID_ERROR(6045, "The user is not a proxy"),

  /**
   * 用户已不是团队成员
   */
  USER_NOT_TEAM_MEMBER(6046, "The user is no longer a team member"),

  /**
   * 新团长是别的团队团长,不能变更
   */
  TEAM_OWNER_REPEAT_ERROR(6047,
      "The new leader is the leader of another team and cannot be changed"),

  /**
   * 区域不一致
   */
  TEAM_REGION_INCONSISTENCY_ERROR(6048, "Regional inconsistency"),

  /**
   * 拒绝接受.
   */
  REFUSE_ACCEPT(6049, "Refuse accept"),
  ;

  private final Integer code;
  private final String message;

  TeamErrorCode(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 this.name();
  }

}
