package com.muchinfo.mtp3common.enumtype;

import lombok.Getter;

@Getter
public enum GlobalExceptionEnum {
    // 1. 字段(枚举实例)
    ERROR(500, "System exception, please contact the management personnel!"),

    SUCCESS(200, "Operation successful!"),

    PHONE_IS_NULL_ERROR(1001, "Phone cannot be empty"),

    PARAM_ERROR(1002, "Parameter verification exception"),

    DELETE_ERROR(1101, "Deletion"),

    UPLOAD_ERROR(1102, "Upload file failed with error"),
    ;


    // 2. 枚举实例
    private final Integer code;

    private final String message;

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