diff --git a/ApiDto/ApiDto.csproj b/ApiDto/ApiDto.csproj new file mode 100644 index 0000000..f806393 --- /dev/null +++ b/ApiDto/ApiDto.csproj @@ -0,0 +1,23 @@ + + + + net8.0 + disable + enable + Winsomnia + 1.0.0-a0 + 1.0.0.0 + 1.0.0.0 + Mirea.Api.Dto + $(AssemblyName) + True + ApiDtoDocs.xml + + + + + Always + + + + diff --git a/ApiDto/Responses/CampusBasicInfoResponse.cs b/ApiDto/Responses/CampusBasicInfoResponse.cs new file mode 100644 index 0000000..0232050 --- /dev/null +++ b/ApiDto/Responses/CampusBasicInfoResponse.cs @@ -0,0 +1,22 @@ +namespace Mirea.Api.Dto.Responses; + +/// +/// Represents basic information about a campus. +/// +public class CampusBasicInfoResponse +{ + /// + /// Gets or sets the unique identifier of the campus. + /// + public int Id { get; set; } + + /// + /// Gets or sets the code name of the campus. + /// + public required string CodeName { get; set; } + + /// + /// Gets or sets the full name of the campus (optional). + /// + public string? FullName { get; set; } +} \ No newline at end of file diff --git a/ApiDto/Responses/CampusDetailsResponse.cs b/ApiDto/Responses/CampusDetailsResponse.cs new file mode 100644 index 0000000..7caff6b --- /dev/null +++ b/ApiDto/Responses/CampusDetailsResponse.cs @@ -0,0 +1,27 @@ +namespace Mirea.Api.Dto.Responses; + +/// +/// Represents detailed information about a campus. +/// +public class CampusDetailsResponse +{ + /// + /// Gets or sets the unique identifier of the campus. + /// + public int Id { get; set; } + + /// + /// Gets or sets the code name of the campus. + /// + public required string CodeName { get; set; } + + /// + /// Gets or sets the full name of the campus (optional). + /// + public string? FullName { get; set; } + + /// + /// Gets or sets the address of the campus (optional). + /// + public string? Address { get; set; } +} diff --git a/ApiDto/Responses/DisciplineResponse.cs b/ApiDto/Responses/DisciplineResponse.cs new file mode 100644 index 0000000..d98b723 --- /dev/null +++ b/ApiDto/Responses/DisciplineResponse.cs @@ -0,0 +1,17 @@ +namespace Mirea.Api.Dto.Responses; + +/// +/// Represents information about a discipline. +/// +public class DisciplineResponse +{ + /// + /// Gets or sets the unique identifier of the discipline. + /// + public int Id { get; set; } + + /// + /// Gets or sets the name of the discipline. + /// + public required string Name { get; set; } +} \ No newline at end of file diff --git a/ApiDto/Responses/ErrorResponse.cs b/ApiDto/Responses/ErrorResponse.cs new file mode 100644 index 0000000..b67377c --- /dev/null +++ b/ApiDto/Responses/ErrorResponse.cs @@ -0,0 +1,18 @@ +namespace Mirea.Api.Dto.Responses; + +/// +/// A class for providing information about an error +/// +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. + /// + 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. + /// + public required int Code { get; set; } +} \ No newline at end of file diff --git a/ApiDto/Responses/FacultyDetailsResponse.cs b/ApiDto/Responses/FacultyDetailsResponse.cs new file mode 100644 index 0000000..ff86c47 --- /dev/null +++ b/ApiDto/Responses/FacultyDetailsResponse.cs @@ -0,0 +1,32 @@ +namespace Mirea.Api.Dto.Responses; + +/// +/// Represents detailed information about a faculty. +/// +public class FacultyDetailsResponse +{ + /// + /// Gets or sets the unique identifier of the faculty. + /// + public int Id { get; set; } + + /// + /// Gets or sets the name of the faculty. + /// + public required string Name { get; set; } + + /// + /// Gets or sets the unique identifier of the campus to which the faculty belongs (optional). + /// + public int? CampusId { get; set; } + + /// + /// Gets or sets the name of the campus to which the faculty belongs (optional). + /// + public string? CampusName { get; set; } + + /// + /// Gets or sets the code name of the campus to which the faculty belongs (optional). + /// + public string? CampusCode { get; set; } +} \ No newline at end of file diff --git a/ApiDto/Responses/FacultyResponse.cs b/ApiDto/Responses/FacultyResponse.cs new file mode 100644 index 0000000..136655d --- /dev/null +++ b/ApiDto/Responses/FacultyResponse.cs @@ -0,0 +1,22 @@ +namespace Mirea.Api.Dto.Responses; + +/// +/// Represents basic information about a faculty. +/// +public class FacultyResponse +{ + /// + /// Gets or sets the unique identifier of the faculty. + /// + public int Id { get; set; } + + /// + /// Gets or sets the name of the faculty. + /// + public required string Name { get; set; } + + /// + /// Gets or sets the unique identifier of the campus to which the faculty belongs (optional). + /// + public int? CampusId { get; set; } +} \ No newline at end of file diff --git a/ApiDto/Responses/GroupDetailsResponse.cs b/ApiDto/Responses/GroupDetailsResponse.cs new file mode 100644 index 0000000..35c665b --- /dev/null +++ b/ApiDto/Responses/GroupDetailsResponse.cs @@ -0,0 +1,27 @@ +namespace Mirea.Api.Dto.Responses; + +/// +/// Represents detailed information about a group. +/// +public class GroupDetailsResponse +{ + /// + /// Gets or sets the unique identifier of the group. + /// + public int Id { get; set; } + + /// + /// Gets or sets the name of the group. + /// + public required string Name { get; set; } + + /// + /// Gets or sets the unique identifier of the faculty to which the group belongs (optional). + /// + public int? FacultyId { get; set; } + + /// + /// Gets or sets the name of the faculty to which the group belongs (optional). + /// + public string? FacultyName { get; set; } +} \ No newline at end of file diff --git a/ApiDto/Responses/GroupResponse.cs b/ApiDto/Responses/GroupResponse.cs new file mode 100644 index 0000000..4526e72 --- /dev/null +++ b/ApiDto/Responses/GroupResponse.cs @@ -0,0 +1,22 @@ +namespace Mirea.Api.Dto.Responses; + +/// +/// Represents basic information about a group. +/// +public class GroupResponse +{ + /// + /// Gets or sets the unique identifier of the group. + /// + public int Id { get; set; } + + /// + /// Gets or sets the name of the group. + /// + public required string Name { get; set; } + + /// + /// Gets or sets the unique identifier of the faculty to which the group belongs (optional). + /// + public int? FacultyId { get; set; } +} \ No newline at end of file diff --git a/ApiDto/Responses/ProfessorResponse.cs b/ApiDto/Responses/ProfessorResponse.cs new file mode 100644 index 0000000..3a7b761 --- /dev/null +++ b/ApiDto/Responses/ProfessorResponse.cs @@ -0,0 +1,22 @@ +namespace Mirea.Api.Dto.Responses; + +/// +/// Represents information about a professor. +/// +public class ProfessorResponse +{ + /// + /// Gets or sets the unique identifier of the professor. + /// + public int Id { get; set; } + + /// + /// Gets or sets the name of the professor. + /// + public required string Name { get; set; } + + /// + /// Gets or sets the alternate name of the professor (optional). + /// + public string? AltName { get; set; } +} \ No newline at end of file