package com.goldenchart.auth;

public enum UserRole {
    ADMIN,
    USER,
    GUEST;

    public static UserRole fromString(String value) {
        if (value == null || value.isBlank()) return USER;
        try {
            return UserRole.valueOf(value.trim().toUpperCase());
        } catch (IllegalArgumentException e) {
            return USER;
        }
    }
}
