diff --git a/ApiDto/Responses/CampusBasicInfoResponse.cs b/ApiDto/Responses/CampusBasicInfoResponse.cs index 0232050..4ad46a7 100644 --- a/ApiDto/Responses/CampusBasicInfoResponse.cs +++ b/ApiDto/Responses/CampusBasicInfoResponse.cs @@ -1,4 +1,6 @@ -namespace Mirea.Api.Dto.Responses; +using System.ComponentModel.DataAnnotations; + +namespace Mirea.Api.Dto.Responses; /// /// Represents basic information about a campus. @@ -8,11 +10,13 @@ public class CampusBasicInfoResponse /// /// Gets or sets the unique identifier of the campus. /// + [Required] public int Id { get; set; } /// /// Gets or sets the code name of the campus. /// + [Required] public required string CodeName { get; set; } /// diff --git a/ApiDto/Responses/CampusDetailsResponse.cs b/ApiDto/Responses/CampusDetailsResponse.cs index 7caff6b..82db94e 100644 --- a/ApiDto/Responses/CampusDetailsResponse.cs +++ b/ApiDto/Responses/CampusDetailsResponse.cs @@ -1,4 +1,6 @@ -namespace Mirea.Api.Dto.Responses; +using System.ComponentModel.DataAnnotations; + +namespace Mirea.Api.Dto.Responses; /// /// Represents detailed information about a campus. @@ -8,11 +10,13 @@ public class CampusDetailsResponse /// /// Gets or sets the unique identifier of the campus. /// + [Required] public int Id { get; set; } /// /// Gets or sets the code name of the campus. /// + [Required] public required string CodeName { get; set; } /// diff --git a/ApiDto/Responses/DisciplineResponse.cs b/ApiDto/Responses/DisciplineResponse.cs index d98b723..9b35e13 100644 --- a/ApiDto/Responses/DisciplineResponse.cs +++ b/ApiDto/Responses/DisciplineResponse.cs @@ -1,4 +1,6 @@ -namespace Mirea.Api.Dto.Responses; +using System.ComponentModel.DataAnnotations; + +namespace Mirea.Api.Dto.Responses; /// /// Represents information about a discipline. @@ -8,10 +10,12 @@ public class DisciplineResponse /// /// Gets or sets the unique identifier of the discipline. /// + [Required] public int Id { get; set; } /// /// Gets or sets the name of the discipline. /// + [Required] public required string Name { get; set; } } \ No newline at end of file diff --git a/ApiDto/Responses/ErrorResponse.cs b/ApiDto/Responses/ErrorResponse.cs index b67377c..f0dc33c 100644 --- a/ApiDto/Responses/ErrorResponse.cs +++ b/ApiDto/Responses/ErrorResponse.cs @@ -1,4 +1,6 @@ -namespace Mirea.Api.Dto.Responses; +using System.ComponentModel.DataAnnotations; + +namespace Mirea.Api.Dto.Responses; /// /// A class for providing information about an error @@ -9,10 +11,12 @@ public class ErrorResponse /// The text or translation code of the error. This field may not contain information in specific scenarios. /// For example, it might be empty for HTTP 204 responses where no content is returned or if the validation texts have not been configured. /// + [Required] public required string Error { get; set; } /// /// In addition to returning the response code in the header, it is also duplicated in this field. /// Represents the HTTP response code. /// + [Required] public required int Code { get; set; } } \ No newline at end of file diff --git a/ApiDto/Responses/FacultyDetailsResponse.cs b/ApiDto/Responses/FacultyDetailsResponse.cs index ff86c47..09c863b 100644 --- a/ApiDto/Responses/FacultyDetailsResponse.cs +++ b/ApiDto/Responses/FacultyDetailsResponse.cs @@ -1,4 +1,6 @@ -namespace Mirea.Api.Dto.Responses; +using System.ComponentModel.DataAnnotations; + +namespace Mirea.Api.Dto.Responses; /// /// Represents detailed information about a faculty. @@ -8,11 +10,13 @@ public class FacultyDetailsResponse /// /// Gets or sets the unique identifier of the faculty. /// + [Required] public int Id { get; set; } /// /// Gets or sets the name of the faculty. /// + [Required] public required string Name { get; set; } /// diff --git a/ApiDto/Responses/FacultyResponse.cs b/ApiDto/Responses/FacultyResponse.cs index 136655d..adcf127 100644 --- a/ApiDto/Responses/FacultyResponse.cs +++ b/ApiDto/Responses/FacultyResponse.cs @@ -1,4 +1,6 @@ -namespace Mirea.Api.Dto.Responses; +using System.ComponentModel.DataAnnotations; + +namespace Mirea.Api.Dto.Responses; /// /// Represents basic information about a faculty. @@ -8,11 +10,13 @@ public class FacultyResponse /// /// Gets or sets the unique identifier of the faculty. /// + [Required] public int Id { get; set; } /// /// Gets or sets the name of the faculty. /// + [Required] public required string Name { get; set; } /// diff --git a/ApiDto/Responses/GroupDetailsResponse.cs b/ApiDto/Responses/GroupDetailsResponse.cs index d4f5cae..44670fe 100644 --- a/ApiDto/Responses/GroupDetailsResponse.cs +++ b/ApiDto/Responses/GroupDetailsResponse.cs @@ -1,4 +1,6 @@ -namespace Mirea.Api.Dto.Responses; +using System.ComponentModel.DataAnnotations; + +namespace Mirea.Api.Dto.Responses; /// /// Represents detailed information about a group. @@ -8,16 +10,19 @@ public class GroupDetailsResponse /// /// Gets or sets the unique identifier of the group. /// + [Required] public int Id { get; set; } /// /// Gets or sets the name of the group. /// + [Required] public required string Name { get; set; } /// /// Gets or sets the course number of the group. /// + [Required] public int CourseNumber { get; set; } /// diff --git a/ApiDto/Responses/GroupResponse.cs b/ApiDto/Responses/GroupResponse.cs index 63b91b3..0177459 100644 --- a/ApiDto/Responses/GroupResponse.cs +++ b/ApiDto/Responses/GroupResponse.cs @@ -1,4 +1,6 @@ -namespace Mirea.Api.Dto.Responses; +using System.ComponentModel.DataAnnotations; + +namespace Mirea.Api.Dto.Responses; /// /// Represents basic information about a group. @@ -8,16 +10,19 @@ public class GroupResponse /// /// Gets or sets the unique identifier of the group. /// + [Required] public int Id { get; set; } /// /// Gets or sets the name of the group. /// + [Required] public required string Name { get; set; } /// /// Gets or sets the course number of the group. /// + [Required] public int CourseNumber { get; set; } /// diff --git a/ApiDto/Responses/ProfessorResponse.cs b/ApiDto/Responses/ProfessorResponse.cs index 3a7b761..02361f9 100644 --- a/ApiDto/Responses/ProfessorResponse.cs +++ b/ApiDto/Responses/ProfessorResponse.cs @@ -1,4 +1,6 @@ -namespace Mirea.Api.Dto.Responses; +using System.ComponentModel.DataAnnotations; + +namespace Mirea.Api.Dto.Responses; /// /// Represents information about a professor. @@ -8,11 +10,13 @@ public class ProfessorResponse /// /// Gets or sets the unique identifier of the professor. /// + [Required] public int Id { get; set; } /// /// Gets or sets the name of the professor. /// + [Required] public required string Name { get; set; } ///