namespace Domain.Ports.Repositories;

using Domain.Entities;
using System.Linq.Expressions;

public interface ISubjectRepository
{
    Task<Subject?> GetByIdAsync(int id, CancellationToken ct = default);
    Task<Subject?> GetByIdWithProfessorAsync(int id, CancellationToken ct = default);
    Task<IReadOnlyList<Subject>> GetAllAsync(CancellationToken ct = default);
    Task<IReadOnlyList<Subject>> GetAllWithProfessorsAsync(CancellationToken ct = default);
    Task<IReadOnlyList<Subject>> GetAvailableForStudentAsync(int studentId, CancellationToken ct = default);

    // Projection support
    Task<IReadOnlyList<TResult>> GetAllProjectedAsync<TResult>(
        Expression<Func<Subject, TResult>> selector,
        CancellationToken ct = default);
}
