package com.YuyeTech.HeartRate.enums;

import lombok.Getter;

/**
 * 返回的
 * @author:slambb
 * @date:2019/12/5
 */
@Getter
public enum ResultEnum {
    SUCCESS(0,"成功"),
    TOKEN_SUCCESS(300,"用户授权认证通过!"),
    TOKEN_IS_ILLEGAL(301,"用户授权认证没有通过!客户端请求参数TOKEN信息无效"),
    TOKEN_DOES_NOT_EXIST(302,"用户授权认证没有通过!客户端请求参数中无TOKEN信息"),
    TOKEN_OUT_OF_DATE(303,"用户授权认证没有通过!TOKEN过期，重新获取"),
    TOKEN_DOES_NOT_HAVE_USER_ID(304,"用户授权认证没有通过!TOKEN不存在用户id"),
    TOKEN_FILTER_ERROR(306,"登录异常！"),

    APPLE_LOGIN_VALIDATION_FAIL(311,"授权验证失败"),
    APPLE_LOGIN_TOKEN_FAIL(312,"授权解码失败"),

    LOGIN_SUCCESS(313,"用户登陆成功!"),
    LOGOUT_SUCCESS(314,"退出登陆成功!"),

    COOKIE_PARAM_ERROR(315, "cookie不存在"),

    USER_NAME_ERROR(316, "用户名不存在"),

    NO_OTA(317,"OTA资源不存在"),

    NO_UPDATE(318,"更新资源不存在"),

    NO_VERSION_APPID(319,"appId不是对应数据库的appId"),

    VERSION_CODE_NULL(320,"version code 不存在"),

    VERSION_CODE_ERROR(321,"version code 错误"),

    APPLE_REVOKE_ERROR(322,"apple:注销用户失败！"),
    REVOKE_ERROR(323,"注销用户方式异常！"),
    WEIXIN_REVOKE_ERROR(324,"WEIXIN:注销用户失败！"),
    PHONE_NUMBER_REVOKE_ERROR(324,"PHONE:注销用户失败！"),
    BOX_EMAIL_REVOKE_ERROR(324,"WEIXIN:注销用户失败！"),
    //wallets
    WALLETS_GET_ERROR(401,"获取WALLETS错误"),
    WALLETS_MODIFY_ERROR(402,"修改WALLETS数据错误"),
    WALLETS_GOLD_INSUFFICIENT(404,"WALLETS钱包金币不足"),
    WALLETS_DIAMOND_INSUFFICIENT(405,"WALLETS钱包钻石不足"),

    //level
    LEVEL_NO_UNLOCKED(801,"关卡解锁失败"),
    PREVIOUS_LEVEL_NO_PASSED(802,"上一个关卡没有通关"),
    ASSOCIATED_LEVEL_NO_UNLOCKED(803,"关联关卡没有解锁或者limitLevel未设置"),
    OTHER_LEVEL_NO_UNLOCKED(804,"todo其他关卡解锁失败操作"),
    MUST_PASS_FIRST_LEVEL(805,"先通过第一个关卡"),
    LEVEL_ERROR(806,"关卡信息错误！"),

    //signIn
    SIGN_IN_REPEAT(901,"重复签到"),

    //******
    NO_PARAMETERS_CARRIED(305,"输入对应参数"),

    META_LOGIN_ERROR(306,"登录失败！"),
    META_LOGIN_LIMIT(307,"禁止用户登录！"),
    //setting部分
    SETTING_IS_NULL(306,"配置信息不存在"),
    //redis部分
    REDIS_IS_LOCK(307,"操作过于频繁，稍后再试！"),
    REDIS_IS_LOCK_ERROR(308,"操作失败，稍后再试！"),

    //特定接口访问部分限制
    LOGIN_IP_IS_ERROR(309,"IP异常?!"),
    //用户数据
    USER_DOES_NOT_EXIST(400,"不能存在用户信息！"),
    USER_VERIFICATION_ERROR(402,"登录验证失败异常！"),
    USER_NOT_ADDRESS(403,"用户地址不存在！"),
    USER_LIMIT_LOGIN(404,"用户限制登录！"),
    USER_LOGIN_LOCK(405,"用户保存繁忙，请重试操作！"),
    USER_DATA_DOES_NOT_EXIST(400,"不存在用户关联信息！"),
    CODE_ERROR(406,"验证码异常！"),
    CODE_DELETE_ERROR(407,"验证码操作失败！")
    ;
    private Integer code;

    private String message;

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