using Jiaowu.Api.Domain.Academic;
using Jiaowu.Api.Infrastructure.Persistence;
using Microsoft.EntityFrameworkCore;

namespace Jiaowu.Api.Infrastructure.Exams;

internal static class InvigilatorCandidateQuery
{
    public static IQueryable<Teacher> Create(
        AppDbContext db,
        IEnumerable<Guid> excludedTeacherIds) =>
        db.Teachers.AsNoTracking()
            .Where(x => x.Status == TeacherStatus.Active)
            .WhereNotIn(excludedTeacherIds, x => x.Id);
}
