88 lines
1.8 KiB
C#
88 lines
1.8 KiB
C#
using UniVerse.Domain.Enums;
|
|
|
|
namespace UniVerse.Application.DTOs.Lectures;
|
|
|
|
public record LectureDto(
|
|
int Id,
|
|
int CourseId,
|
|
string CourseName,
|
|
int? TeacherId,
|
|
string? TeacherName,
|
|
int? LocationId,
|
|
string? LocationName,
|
|
string Title,
|
|
string? Description,
|
|
LectureFormat Format,
|
|
DateTime StartsAt,
|
|
DateTime EndsAt,
|
|
bool IsOpen,
|
|
int MaxEnrollments,
|
|
int EnrollmentsCount,
|
|
string? OnlineUrl,
|
|
DateTime CreatedAt,
|
|
bool IsEnrolled = false
|
|
);
|
|
|
|
public record LectureDetailDto(
|
|
int Id,
|
|
int CourseId,
|
|
string CourseName,
|
|
int? TeacherId,
|
|
string? TeacherName,
|
|
int? LocationId,
|
|
string? LocationName,
|
|
string Title,
|
|
string? Description,
|
|
LectureFormat Format,
|
|
DateTime StartsAt,
|
|
DateTime EndsAt,
|
|
bool IsOpen,
|
|
int MaxEnrollments,
|
|
int EnrollmentsCount,
|
|
string? OnlineUrl,
|
|
DateTime CreatedAt,
|
|
bool IsEnrolled
|
|
);
|
|
|
|
public record CreateLectureRequest(
|
|
int CourseId,
|
|
int? TeacherId,
|
|
int? LocationId,
|
|
string Title,
|
|
string? Description,
|
|
LectureFormat Format,
|
|
DateTime StartsAt,
|
|
DateTime EndsAt,
|
|
bool IsOpen,
|
|
int MaxEnrollments,
|
|
string? OnlineUrl
|
|
);
|
|
|
|
public record UpdateLectureRequest(
|
|
int? TeacherId,
|
|
int? LocationId,
|
|
string Title,
|
|
string? Description,
|
|
LectureFormat Format,
|
|
DateTime StartsAt,
|
|
DateTime EndsAt,
|
|
bool IsOpen,
|
|
int MaxEnrollments,
|
|
string? OnlineUrl
|
|
);
|
|
|
|
public record LectureFilterRequest(
|
|
DateOnly? DateFrom,
|
|
DateOnly? DateTo,
|
|
int? CourseId,
|
|
int? TeacherId,
|
|
LectureFormat? Format,
|
|
bool? IsOpen,
|
|
int? TagId,
|
|
string? Search,
|
|
int Page = 1,
|
|
int PageSize = 20
|
|
);
|
|
|
|
public record EnrollmentDto(int Id, int UserId, string? UserName, string? UserEmail, bool Attended, DateTime CreatedAt);
|