34 lines
706 B
C#
34 lines
706 B
C#
namespace Application.Students.DTOs;
|
|
|
|
public record StudentDto(
|
|
int Id,
|
|
string Name,
|
|
string Email,
|
|
int TotalCredits,
|
|
IReadOnlyList<EnrollmentDto> Enrollments);
|
|
|
|
public record EnrollmentDto(
|
|
int Id,
|
|
int SubjectId,
|
|
string SubjectName,
|
|
int Credits,
|
|
string ProfessorName,
|
|
DateTime EnrolledAt);
|
|
|
|
public record CreateStudentRequest(string Name, string Email);
|
|
|
|
public record UpdateStudentRequest(string Name, string Email);
|
|
|
|
// Pagination DTOs
|
|
public record PagedResult<T>(
|
|
IReadOnlyList<T> Items,
|
|
int? NextCursor,
|
|
int TotalCount,
|
|
bool HasNextPage);
|
|
|
|
public record StudentPagedDto(
|
|
int Id,
|
|
string Name,
|
|
string Email,
|
|
int TotalCredits);
|