package com.fdkankan.common.constant;

public enum ErrorCode {

    SYSTEM_ERROR(-1, "服务器异常"),
    PARAM_ERROR(-2, "解析请求参数出错"),
    PARAM_REQUIRED(-3, "缺少必要参数"),
    PARAM_FORMAT_ERROR(-4, "解析请求参数出错"),
    SYSTEM_BUSY(-5, "系统繁忙，请稍后再试！"),

    HAVE_NO_RIGHT(1001, "无权访问！"),
    APP_KEY_IS_NULL(1002, "appkey为空"),
    APP_KEY_ILLEGAL(1003, "appkey不正确"),


    AUTH_FAIL(4000, "鉴权失败！"),
    NON_TOKEN(4001, "无token，请重新登录"),
    TOKEN_ILLEGAL(4002, "token不合法"),
    TOKEN_NOT_FOUND(4003, "用户未登录"),
    APP_ID_ILLEGAL(4004 , "非法的APP ID"),
    USER_NOT_EXIST(4005,"用户不存在"),
    PASSWORD_ERROR(4006,"账号密码错误"),
    MISSING_REQUIRED_PARAMETERS(4007,"缺少必要参数"),
    USER_NOT_LOGIN(4008, "用户未登录"),
    NOT_RECORD(4009, "暂无记录"),
    USERNAME_PASSWORD_REQUIRE(4010, "账号密码不能为空"),
    ERROR_MSG(40010, "操作失败"),
    EMPTY_FILE(40011, "空文件"),
    AGENT_EXIST(40012, "经销商已存在"),
    AGENT_NOT_EXIST(40012, "经销商已存在"),
    AGENT_SUB_EXIST(40013, "请先删除经销商下的用户"),
    EMAIL_ERROR(40014, "邮箱格式不正确"),
    PASSWORD_VIOLATION(40015, "密码需要包含英文大小写、数字，长度8-16字符"),
    PASSWORD_TWO_VIOLATION(40016, "两次输入的密码不一致"),
    PHONE_VIOLATION(40017, "手机号码格式错误"),
    PHONE_EXIST(40018, "该手机已被注册"),
    V_CODE_ERROR(40019, "验证码错误"),
    NICKNAME_ERROR(40020, "昵称包含敏感词"),
    V_CODE_TIME_NOT_OUT(40021, "60秒内不能重复获取验证码"),
    PHONE_CODE_TO_MANY(40022, "手机验证码获取验证码次数过多,请明天再试"),
    EMAIL_EXIST(40023, "手机验证码获取验证码次数过多,请明天再试"),
    CAMERA_BIND_NO_EXIST(40024, "绑定的相机不存在"),
    VALUE_NOT_EXIST(40025, "当前增值权益不存在"),
    CAMERA_NOT_OWN(40026, "不能将相机分配给自己"),
    CAMERA_GIVEN(40027, "当前相机已被授权，请选择另外相机绑定"),
    FILE_NOT_EXIST(40027, "需要上传或使用的文件不存在"),
    NOT_PERMISSION(40027, "登录失败，账号无权访问"),




    FAILURE_CODE_3001(3001, "缺少必要参数"),
    FAILURE_CODE_3002(3002, "访问异常!"),
    FAILURE_CODE_3003(3003, "非法访问!"),
    FAILURE_CODE_3004(3004, "用户未登录"),
    FAILURE_CODE_3005(3005, "验证码已过期"),
    FAILURE_CODE_3006(3006, "验证码错误"),
    FAILURE_CODE_3007(3007, "昵称已存在"),
    FAILURE_CODE_3008(3008, "该手机已被注册"),
    FAILURE_CODE_3009(3009, "两次输入的密码不一致"),
    FAILURE_CODE_3010(3010, "昵称长度错误"),
    FAILURE_CODE_3011(3011, "密码需要包含英文大小写、数字，长度8-16字符"),
    FAILURE_CODE_3012(3012, "昵称包含敏感词"),
    FAILURE_CODE_3013(3013, "手机号码格式错误"),
    FAILURE_CODE_3014(3014, "账号或密码不正确"),
    FAILURE_CODE_3015(3015, "用户不存在"),
    FAILURE_CODE_3016(3016, "登录失败，账号无权访问"),
    FAILURE_CODE_3017(3017, "空文件"),
    FAILURE_CODE_3018(3018, "需要上传或使用的文件不存在"),
    FAILURE_CODE_3019(3019, "邮箱格式不正确"),
    FAILURE_CODE_3020(3020, "邮箱地址已存在"),
    FAILURE_CODE_3021(3021, "账号不存在，请核对后重新输入。"),
    FAILURE_CODE_3022(3022, "该场景已添加协作者，请先取消协作后再添加"),
    FAILURE_CODE_3023(3023, "手机验证码获取验证码次数过多,请明天再试"),
    FAILURE_CODE_3024(3024, "不能将场景协作给自己"),
    FAILURE_CODE_3025(3025, "不能将相机分配给自己"),
    FAILURE_CODE_3026(3026, "有部分场景已存在协作者，请先取消协作后再添加"),
    FAILURE_CODE_3027(3027, "原密码错误"),
    FAILURE_CODE_3028(3028, "角色已存在"),
    FAILURE_CODE_3029(3029, "当前角色存在关联的用户，请先删除用户或修改用户所属角色"),
    FAILURE_CODE_3030(3030, "当前增值权益不存在"),
    FAILURE_CODE_3031(3031, "相机已绑定"),
    FAILURE_CODE_3032(3032, "当前相机已被授权，请选择另外相机绑定"),
    FAILURE_CODE_3033(3033, "60秒内不能重复获取验证码"),


    FAILURE_CODE_3037(3037, "场景原始数据已过期，无法生成mesh！"),

    FAILURE_CODE_4001(4001, "缺少必要文件：%s"),
    FAILURE_CODE_4002(4002, "文件不存在：%s"),
    FAILURE_CODE_4003(4003, "图片大小不能超过：%s"),
    FAILURE_CODE_4004(4004, "此接口仅支持看看和看见相机场景"),
    FAILURE_CODE_4005(4005, "已超出容量，不允许重新上传"),

    FAILURE_CODE_4006(4006, "此相机场景不允许上传至官网"),


    FAILURE_CODE_5001(5001, "modeldata.json为空"),
    FAILURE_CODE_5002(5002, "order值为空"),
    FAILURE_CODE_5003(5003, "guideSid或order值为空"),
    FAILURE_CODE_5004(5004, "guideSid或guideName值为空"),
    FAILURE_CODE_5005(5005, "场景为空"),
    FAILURE_CODE_5006(5006, "余额不足"),
    FAILURE_CODE_5007(5007, "非八目场景"),
    FAILURE_CODE_5008(5008, "该场景已经被封存，无法删除"),
    FAILURE_CODE_5009(5009, "场景被删除"),
    FAILURE_CODE_5010(5010, "场景不属于该相机"),
    FAILURE_CODE_5011(5011, "创建"),
    FAILURE_CODE_5012(5012, "数据不正常"),
    FAILURE_CODE_5013(5013, "场景对应的用户名为空"),
    FAILURE_CODE_5014(5014, "该用户无权操作该场景"),
    FAILURE_CODE_5015(5015, "该场景不属于当前登录账号"),
    FAILURE_CODE_5016(5016, "热点外链场景不对"),
    FAILURE_CODE_5017(5017, "*上传模型失败，请参照右侧教程"),
    FAILURE_CODE_5018(5018, "zip文件只能有一层目录或无目录"),
    FAILURE_CODE_5019(5019, "必须有且仅有一个obj和mtl文件"),
    FAILURE_CODE_5020(5020, "贴图需控制在1.5M以内，obj文件需要控制在20M以内。"),
    FAILURE_CODE_5021(5021, "场景密钥不正确"),
    FAILURE_CODE_5022(5022, "上传文件格式，名称不一致"),
    FAILURE_CODE_5023(5023, "上传文件格式不正确，只能是jpg或mp4格式"),
    FAILURE_CODE_5024(5024, "有场景打包中，请稍后重试"),
    FAILURE_CODE_5025(5025, "数据包不存在，请先打成zip包"),
    FAILURE_CODE_5026(5026, "上传的压缩包类型不正确"),
    FAILURE_CODE_5027(5027, "文件夹不存在"),
    FAILURE_CODE_5028(5028, "无权修改该文件夹"),
    FAILURE_CODE_5029(5029, "场景下载失败，请稍后重试"),
    FAILURE_CODE_5030(5030, "同级文件夹名称不能重复"),
    FAILURE_CODE_5031(5031, "场景打包中不能重复操作"),
    FAILURE_CODE_5032(5032, "三维家打包记录不存在"),
    FAILURE_CODE_5033(5033, "该场景正在计算中"),
    FAILURE_CODE_5034(5034, "该场景已封存"),
    FAILURE_CODE_5035(5035, "任务已存在"),
    FAILURE_CODE_5036(5036, "获取锁失败"),
    FAILURE_CODE_5037(5037, "上传图片失败"),
    FAILURE_CODE_5038(5038, "文件不存在"),
    FAILURE_CODE_5039(5039, "画墙重建模型失败"),
    FAILURE_CODE_5040(5040, "上传音频失败"),
    FAILURE_CODE_5041(5041, "上传图片多媒体数据失败"),
    FAILURE_CODE_5042(5042, "算法计算失败"),
    FAILURE_CODE_5043(5043, "打包zip失败"),
    FAILURE_CODE_5044(5044, "mac为空"),
    FAILURE_CODE_5045(5045, "totalPicNum为空"),
    FAILURE_CODE_5046(5046, "chunks为空"),
    FAILURE_CODE_5047(5047, "folderName为空"),
    FAILURE_CODE_5048(5048, "文件为空"),
    FAILURE_CODE_5049(5049, "文件Id为空"),
    FAILURE_CODE_5050(5050, "照片数目为空"),
    FAILURE_CODE_5051(5051, "md5为空"),
    FAILURE_CODE_5052(5052, "上传失败, 请重新上传。"),
    FAILURE_CODE_5053(5053, "场景码生成失败，请重试。"),
    FAILURE_CODE_5054(5054, "该场景不存在无法扣除容量"),
    FAILURE_CODE_5055(5055, "该场景不属于八目相机无法扣除容量"),
    FAILURE_CODE_5056(5056, "双目相机异常"),
    FAILURE_CODE_5057(5057, "该场景不属于八目相机，无法重置容量"),
    FAILURE_CODE_5058(5054, "该场景不存在,无法重置容量"),
    FAILURE_CODE_5059(5059, "该压缩包无可用obj或者mtl文件"),
    FAILURE_CODE_5060(5060, "obj文件名应为mesh.obj"),
    FAILURE_CODE_5061(5061, "该压缩包无可用jpg文件"),
    FAILURE_CODE_5062(5062, "无可用jpg文件"),
    FAILURE_CODE_5063(5063, "下载失败"),
    FAILURE_CODE_5064(5064, "场景版本低于V4，不能执行此操作"),
    FAILURE_CODE_5065(5065, "所有文件如贴图、obj、mtl等需要放在根目录同一个文件夹中"),
    FAILURE_CODE_5066(5066, "批量上传或下载任务正在处理中"),
    FAILURE_CODE_5067(5067, "此场景不支持计算"),
    FAILURE_CODE_5068(5068, "floors.json文件不存在"),
    FAILURE_CODE_5069(5069, "floors.json文件数据不正常"),
    FAILURE_CODE_5070(5070, "楼层文件数据不正常"),
    FAILURE_CODE_5071(5071, "复制场景不支持重算"),
    FAILURE_CODE_5072(5072, "相机原始资源已被删除，不支持重算"),
    FAILURE_CODE_5073(5073, "相机原始资源正在被清除"),
    FAILURE_CODE_5074(5074, "场景原始资源被冻结，不支持重算"),
    FAILURE_CODE_5075(5075, "模型不正确"),

    FAILURE_CODE_6003(6003, "该相机未被绑定，请前往 我的相机 先绑定相机后再进行授权 "),


    FAILURE_CODE_7001(7001, "激光场景状态同步失败，请重试！"),
    FAILURE_CODE_7002(7002, "大场景号不能为空"),
    FAILURE_CODE_7003(7003, "文件业务类型不正确！"),
    FAILURE_CODE_7004(7004, "热点数据不能为空！"),
    FAILURE_CODE_7005(7005, "查询不到热点数据！"),
    FAILURE_CODE_7006(7006, "目录不存在！"),
    FAILURE_CODE_7007(7007, "文件格式不正确, 只能是%s格式"),
    FAILURE_CODE_7008(7008, "场景编辑数据不存在"),
    FAILURE_CODE_7009(7009, "球幕视频文件不存在"),
    FAILURE_CODE_7010(7010, "相机或者相机详情不存在"),
    FAILURE_CODE_7011(7011, "公司信息不存在"),
    FAILURE_CODE_7012(7012, "上传的文件名错误"),
    FAILURE_CODE_7013(7013, "上传失败"),
    FAILURE_CODE_7014(7014, "压缩包中文件不能为空"),
    FAILURE_CODE_7015(7015, "仅支持.zip文件上传"),
    FAILURE_CODE_7016(7016, "仅支持.mp4格式文件"),
    FAILURE_CODE_7017(7017, "场景同步失败"),
    FAILURE_CODE_7018(7018, "压缩包内请勿包含文件夹"),
    FAILURE_CODE_7019(7019, "场景升级中，请勿重复升级"),
    FAILURE_CODE_7020(7020, "场景已升级过，不能重复升级"),
    FAILURE_CODE_7021(7021, "场景升级失败，请稍后重试！"),
    FAILURE_CODE_7022(7022, "场景关联数据不能为空！"),
    FAILURE_CODE_7023(7023, "压缩包大小不能超过%s"),


    FAILURE_CODE_8001(8001, "订单不存在"),
    FAILURE_CODE_8002(8002, "支付失败"),
    FAILURE_CODE_8003(8003, "开票金额超过范围"),
    FAILURE_CODE_8004(8004, "支付方式异常"),
    FAILURE_CODE_8005(8005, "文件转换失败！"),


    FAILURE_CODE_9001(9001, "查询不到开票申请"),
    FAILURE_CODE_9002(9002, "不需要发票"),
    FAILURE_CODE_9003(9003, "快递单号不能为空"),
    FAILURE_CODE_9004(9004, "查询不到开票信息"),

    //-----------------openApi----------------------start
    FAILURE_CODE_10000(10000, "appkey未启用"),
    FAILURE_CODE_10001(10001, "appkey未生效"),
    FAILURE_CODE_10002(10002, "账号已存在，请勿重复创建"),
    FAILURE_CODE_10003(10003, "账号不存在"),
    FAILURE_CODE_10004(10004, "api次数不能为空")
    //-----------------openApi----------------------end



    ;

    private Integer code;
    private String message;

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

    public Integer code() {
        return code;
    }

    public String message() {
        return message;
    }

    public String formatMessage(Object... args){
        return String.format(message, args);
    }


}
