docs: add some specification

This commit is contained in:
Polianin Nikita 2024-10-25 04:43:18 +03:00
parent 0788c36bd2
commit 4605c81895
2 changed files with 17 additions and 0 deletions

View File

@ -21,10 +21,18 @@ namespace Mirea.Api.Endpoint.Controllers.V1;
[CacheMaxAge(true)]
public class ScheduleController(IMediator mediator, IOptionsSnapshot<GeneralConfig> config) : BaseController
{
/// <summary>
/// Retrieves the start term for the schedule.
/// </summary>
/// <returns>The start term as a <see cref="DateOnly"/> value.</returns>
[CacheMaxAge(1, 0)]
[HttpGet("StartTerm")]
public ActionResult<DateOnly> GetStartTerm() => config.Value.ScheduleSettings!.StartTerm;
/// <summary>
/// Retrieves the pair periods.
/// </summary>
/// <returns>A dictionary of pair periods, where the key is an integer identifier and the value is a <see cref="PairPeriodTime"/> object.</returns>
[CacheMaxAge(1, 0)]
[HttpGet("PairPeriod")]
public ActionResult<Dictionary<int, PairPeriodTime>> GetPairPeriod() => config.Value.ScheduleSettings!.PairPeriod.ConvertToDto();

View File

@ -2,7 +2,16 @@
namespace Mirea.Api.DataAccess.Application.Cqrs.Professor.Queries.GetProfessorDetails;
/// <summary>
/// Represents a query to retrieve information about a professor.
/// </summary>
/// <remarks>
/// This query can be used to fetch details of a professor by either their unique identifier.
/// </remarks>
public class GetProfessorInfoQuery : IRequest<ProfessorInfoVm>
{
/// <summary>
/// The unique identifier for the professor.
/// </summary>
public required int Id { get; set; }
}