<?php

namespace Modules\Auth\Repositories;

use App\Models\User;

class AuthRepository
{
    public function findByEmail(string $email): ?User
    {
        return User::where('email', $email)->first();
    }

    public function loadLoginRelations(User $user): User
    {
        return $user->load([
            'roles',
            'roles.permissions',
        ]);
    }
}
