package cn.hanghui.outapi.platform.common.entity.rest;

import lombok.Getter;

@Getter
public enum RestCode {

    SUCCESS(200, "成功"),
    FAIL(400, "失败"),
    NOT_FOUND(404, "未发现该资源"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问该资源"),
    DATA_NOT_EXIST(4004, "数据不存在或已删除"),
    REQUEST_TIMEOUT(408, "请求超时"),
    INTERNAL_SERVER_ERROR(500, "健康码平台异常"),
    SERVICE_UNAVAILABLE(503, "服务无法获得"),
    GATEWAY_TIMEOUT(504, "网关超时"),
    REMOTE_INVOCATION_FAIL(900, "远程服务调用失败"),
    INVALID_TOKEN(101408, "无效token"),
    DEVICE_NOT_FOUND(40000, "设备未授权"),
    ADDRESS_CODE_UNBOUND(40001, "暂未开启场所码"),
    PARAMS_IDCARD_INCOMPLETE(40002, "身份证/姓名参数不全");


    public int code;
    private String msg;

    RestCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
