using OmsorgCore.Application.Models;

namespace OmsorgCore.Application.Services;

public enum AddPermissionOverrideFailureReason
{
    UserNotFound
}

public class AddPermissionOverrideResult
{
    public bool Success { get; init; }
    public AddPermissionOverrideFailureReason? FailureReason { get; init; }
    public PermissionOverrideSummary? Override { get; init; }

    public static AddPermissionOverrideResult Fail(AddPermissionOverrideFailureReason reason) => new()
    {
        Success = false,
        FailureReason = reason
    };

    public static AddPermissionOverrideResult Ok(PermissionOverrideSummary @override) => new()
    {
        Success = true,
        Override = @override
    };
}
