<?php

namespace App\Repositories;

use App\Contracts\Repositories\AdminRepositoryInterface;
use App\Models\Admin;

class EloquentAdminRepository implements AdminRepositoryInterface
{
    public function findActiveByEmail(string $email): ?Admin
    {
        return Admin::query()->where('email', $email)->where('is_active', true)->first();
    }

    public function findById(int $id): ?Admin
    {
        return Admin::query()->find($id);
    }
}
