namespace Domain.Ports.Repositories;

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

/// <summary>
/// Repository interface for professor persistence operations.
/// </summary>
public interface IProfessorRepository
{
    /// <summary>
    /// Gets a professor by ID without related entities.
    /// </summary>
    Task<Professor?> GetByIdAsync(int id, CancellationToken ct = default);

    /// <summary>
    /// Gets all professors without related entities.
    /// </summary>
    Task<IReadOnlyList<Professor>> GetAllAsync(CancellationToken ct = default);

    /// <summary>
    /// Gets all professors with their subjects.
    /// </summary>
    Task<IReadOnlyList<Professor>> GetAllWithSubjectsAsync(CancellationToken ct = default);

    /// <summary>
    /// Gets all professors with custom projection to avoid over-fetching.
    /// </summary>
    Task<IReadOnlyList<TResult>> GetAllProjectedAsync<TResult>(
        Expression<Func<Professor, TResult>> selector,
        CancellationToken ct = default);
}
