package net.northking.cctp.attachment.enums;

import net.northking.cctp.common.exception.PlatformError;

public enum FileError implements PlatformError {
    //公共模块
    APP_IS_NULL("APP信息为空"),
    APP_RESOLUTION_ERROR("APP文件解析有误"),
    APP_ICON_GET_ERROR("APP图标获取失败"),
    IPA_UPLOAD_FAIL("IPA包解析失败"),
    APK_UPLOAD_FAIL("APK包解析失败"),
    APK_READ_ERR("解析apk失败"),
    HAP_ERR("hap解析失败"),;

    private static final int START_CODE = 220000;

    private final Integer code;
    private final String msg;

    FileError(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    FileError(String msg) {
        this.code = ordinal() + START_CODE;
        this.msg = msg;
    }

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

    @Override
    public String getMsg() {
        return msg;
    }


}
