using Application.Services.Database;
using Core.Entities;
using Infrastructure.Data;
using Microsoft.EntityFrameworkCore;

namespace Infrastructure.Services.PostgreSQL;

public class DoctorRepository(HealthcareManagerDatabase context) : BasePostgreSQLRepository<Doctor>(context), IDoctorRepository
{
    public async Task<Doctor?> FindByEmailAsync(string email) 
        => await _context.Doctors.FirstOrDefaultAsync(d => d.Email == email);
}
