Add controllers for the Get method #9
@ -1,4 +1,6 @@
|
|||||||
namespace Mirea.Api.Dto.Responses;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Mirea.Api.Dto.Responses;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents basic information about a campus.
|
/// Represents basic information about a campus.
|
||||||
@ -8,11 +10,13 @@ public class CampusBasicInfoResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the unique identifier of the campus.
|
/// Gets or sets the unique identifier of the campus.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the code name of the campus.
|
/// Gets or sets the code name of the campus.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public required string CodeName { get; set; }
|
public required string CodeName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
namespace Mirea.Api.Dto.Responses;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Mirea.Api.Dto.Responses;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents detailed information about a campus.
|
/// Represents detailed information about a campus.
|
||||||
@ -8,11 +10,13 @@ public class CampusDetailsResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the unique identifier of the campus.
|
/// Gets or sets the unique identifier of the campus.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the code name of the campus.
|
/// Gets or sets the code name of the campus.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public required string CodeName { get; set; }
|
public required string CodeName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
namespace Mirea.Api.Dto.Responses;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Mirea.Api.Dto.Responses;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents information about a discipline.
|
/// Represents information about a discipline.
|
||||||
@ -8,10 +10,12 @@ public class DisciplineResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the unique identifier of the discipline.
|
/// Gets or sets the unique identifier of the discipline.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name of the discipline.
|
/// Gets or sets the name of the discipline.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public required string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
}
|
}
|
@ -1,4 +1,6 @@
|
|||||||
namespace Mirea.Api.Dto.Responses;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Mirea.Api.Dto.Responses;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A class for providing information about an error
|
/// 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.
|
/// 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.
|
/// For example, it might be empty for HTTP 204 responses where no content is returned or if the validation texts have not been configured.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public required string Error { get; set; }
|
public required string Error { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// In addition to returning the response code in the header, it is also duplicated in this field.
|
/// In addition to returning the response code in the header, it is also duplicated in this field.
|
||||||
/// Represents the HTTP response code.
|
/// Represents the HTTP response code.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public required int Code { get; set; }
|
public required int Code { get; set; }
|
||||||
}
|
}
|
@ -1,4 +1,6 @@
|
|||||||
namespace Mirea.Api.Dto.Responses;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Mirea.Api.Dto.Responses;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents detailed information about a faculty.
|
/// Represents detailed information about a faculty.
|
||||||
@ -8,11 +10,13 @@ public class FacultyDetailsResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the unique identifier of the faculty.
|
/// Gets or sets the unique identifier of the faculty.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name of the faculty.
|
/// Gets or sets the name of the faculty.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public required string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
namespace Mirea.Api.Dto.Responses;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Mirea.Api.Dto.Responses;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents basic information about a faculty.
|
/// Represents basic information about a faculty.
|
||||||
@ -8,11 +10,13 @@ public class FacultyResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the unique identifier of the faculty.
|
/// Gets or sets the unique identifier of the faculty.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name of the faculty.
|
/// Gets or sets the name of the faculty.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public required string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
namespace Mirea.Api.Dto.Responses;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Mirea.Api.Dto.Responses;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents detailed information about a group.
|
/// Represents detailed information about a group.
|
||||||
@ -8,16 +10,19 @@ public class GroupDetailsResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the unique identifier of the group.
|
/// Gets or sets the unique identifier of the group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name of the group.
|
/// Gets or sets the name of the group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public required string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the course number of the group.
|
/// Gets or sets the course number of the group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public int CourseNumber { get; set; }
|
public int CourseNumber { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
namespace Mirea.Api.Dto.Responses;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Mirea.Api.Dto.Responses;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents basic information about a group.
|
/// Represents basic information about a group.
|
||||||
@ -8,16 +10,19 @@ public class GroupResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the unique identifier of the group.
|
/// Gets or sets the unique identifier of the group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name of the group.
|
/// Gets or sets the name of the group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public required string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the course number of the group.
|
/// Gets or sets the course number of the group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public int CourseNumber { get; set; }
|
public int CourseNumber { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
namespace Mirea.Api.Dto.Responses;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace Mirea.Api.Dto.Responses;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents information about a professor.
|
/// Represents information about a professor.
|
||||||
@ -8,11 +10,13 @@ public class ProfessorResponse
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the unique identifier of the professor.
|
/// Gets or sets the unique identifier of the professor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name of the professor.
|
/// Gets or sets the name of the professor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public required string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user