Рефакторинг
This commit is contained in:
		
							
								
								
									
										115
									
								
								SfeduSchedule.Abstractions/DTO/ModeusScheduleRequestDTO.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										115
									
								
								SfeduSchedule.Abstractions/DTO/ModeusScheduleRequestDTO.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,115 @@ | ||||
| using System.ComponentModel; | ||||
|  | ||||
| namespace SfeduSchedule.Abstractions; | ||||
|  | ||||
| /// <summary> | ||||
| /// DTO для запроса расписания в Modeus. | ||||
| /// </summary> | ||||
| public class ModeusScheduleRequest( | ||||
|     int size, | ||||
|     DateTime timeMin, | ||||
|     DateTime timeMax, | ||||
|     List<Guid>? roomId, | ||||
|     List<Guid>? attendeePersonId, | ||||
|     List<Guid>? courseUnitRealizationId, | ||||
|     List<Guid>? cycleRealizationId, | ||||
|     List<string>? specialtyCode, | ||||
|     List<int>? learningStartYear, | ||||
|     List<string>? profileName, | ||||
|     List<Guid>? curriculumId, | ||||
|     List<string>? typeId) | ||||
| { | ||||
|     /// <summary> | ||||
|     /// Количество элементов в ответе. | ||||
|     /// </summary> | ||||
|     [DefaultValue(10)] | ||||
|     public int Size { get; set; } = size; | ||||
|  | ||||
|     /// <summary> | ||||
|     /// Начальная дата и время. | ||||
|     /// </summary> | ||||
|     public DateTime TimeMin { get; set; } = timeMin; | ||||
|  | ||||
|     /// <summary> | ||||
|     /// Конечная дата и время. | ||||
|     /// </summary> | ||||
|     public DateTime TimeMax { get; set; } = timeMax; | ||||
|  | ||||
|     /// <summary> | ||||
|     /// Список идентификаторов аудиторий. (Guid) | ||||
|     /// </summary> | ||||
|     public List<Guid>? RoomId { get; set; } = roomId; | ||||
|  | ||||
|     /// <summary> | ||||
|     /// Список идентификаторов участников. | ||||
|     /// </summary> | ||||
|     public List<Guid>? AttendeePersonId { get; set; } = attendeePersonId; | ||||
|  | ||||
|     public List<Guid>? CourseUnitRealizationId { get; set; } = courseUnitRealizationId; | ||||
|     public List<Guid>? CycleRealizationId { get; set; } = cycleRealizationId; | ||||
|  | ||||
|     /// <summary> | ||||
|     /// Список кодов специальностей. | ||||
|     /// </summary> | ||||
|     [DefaultValue(new string[] { "09.03.04" })] | ||||
|     public List<string>? SpecialtyCode { get; set; } = specialtyCode; | ||||
|  | ||||
|     /// <summary> | ||||
|     /// Список годов начала обучения. | ||||
|     /// </summary> | ||||
|     [DefaultValue(new int[] { 2022, 2023, 2024, 2025 })] | ||||
|     public List<int>? LearningStartYear { get; set; } = learningStartYear; | ||||
|  | ||||
|     /// <summary> | ||||
|     /// Список названий профилей подготовки. | ||||
|     /// </summary> | ||||
|     [DefaultValue(new string[] { "Методы и средства разработки программного обеспечения" })] | ||||
|     public List<string>? ProfileName { get; set; } = profileName; | ||||
|  | ||||
|     /// <summary> | ||||
|     /// Список идентификаторов учебных планов. | ||||
|     /// </summary> | ||||
|     public List<Guid>? CurriculumId { get; set; } = curriculumId; | ||||
|  | ||||
|     /// <summary> | ||||
|     /// Список типов мероприятий. | ||||
|     /// </summary> | ||||
|     [DefaultValue(new string[] { "MID_CHECK", "CONS", "LAB", "LECT", "SEMI", "EVENT_OTHER", "SELF", "CUR_CHECK" })] | ||||
|     public List<string>? TypeId { get; set; } = typeId; | ||||
| } | ||||
|  | ||||
| /// <summary> | ||||
| /// DTO для поиска аудиторий. | ||||
| /// </summary> | ||||
| public class RoomSearchRequest | ||||
| { | ||||
|     /// <summary> | ||||
|     /// Название аудитории. | ||||
|     /// </summary> | ||||
|     [DefaultValue("")] | ||||
|     public string Name { get; set; } = ""; | ||||
|  | ||||
|     /// <summary> | ||||
|     /// Сортировка. | ||||
|     /// </summary> | ||||
|     [DefaultValue("+building.name,+name")] | ||||
|     public string Sort { get; set; } = "+building.name,+name"; | ||||
|  | ||||
|     /// <summary> | ||||
|     /// Количество элементов в ответе. | ||||
|     /// </summary> | ||||
|     [DefaultValue(10)] | ||||
|     public int Size { get; set; } = 10; | ||||
|  | ||||
|     /// <summary> | ||||
|     /// Номер страницы. (пагинация) | ||||
|     /// </summary> | ||||
|     [DefaultValue(0)] | ||||
|     public int Page { get; set; } = 0; | ||||
|  | ||||
|     /// <summary> | ||||
|     /// Исключать архивные аудитории. false = да, true = нет | ||||
|     /// </summary> | ||||
|     [DefaultValue(false)] | ||||
|     public bool Deleted { get; set; } = false; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user