package com.fizz.business.constants.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 异常错误码枚举
 */
@Getter
public enum ExceptionCodeEnum {
    // 系统级错误
    SYSTEM_ERROR("SYS_500", "系统错误"),
    SERVICE_UNAVAILABLE("SYS_503", "服务不可用"),

    // 业务级错误
    DATA_NOT_FOUND("BIZ_404", "数据不存在"),
    DATA_VALIDATION_FAILED("BIZ_400", "数据验证失败"),
    UNAUTHORIZED_ACCESS("BIZ_401", "未授权访问"),

    // 默认错误
    ERROR("ERR_500", "未知错误");

    private final String code;
    private final String message;

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