<?php

namespace App\Services;

use App\Enums\UserTypeEnum;
use Illuminate\Database\Eloquent\Collection;
use App\Models\UserTypePermission;

class UserTypePermissionService
{
    public function allGuestPermissions(): ?Collection
    {
        return UserTypePermission::where("user_type", "guest")->get();
    }

    public function allPermissionsByUserType(
        UserTypeEnum $userType,
    ): ?Collection {
        return UserTypePermission::where("user_type", $userType->value)->get();
    }
}
