package com.YuyeTech.TPlat.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信息"),

    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 错误"),


    //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,"先通过第一个关卡"),

    //signIn
    SIGN_IN_REPEAT(901,"重复签到"),
    ;
    private Integer code;

    private String message;

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