64 lines
No EOL
2.1 KiB
C#
64 lines
No EOL
2.1 KiB
C#
using System;
|
|
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
using Volo.Abp.Application.Dtos;
|
|
|
|
namespace Kurs.Platform.Classrooms;
|
|
|
|
public class ClassroomDto : FullAuditedEntityDto<Guid>
|
|
{
|
|
public string Name { get; set; }
|
|
public string Description { get; set; }
|
|
public string Subject { get; set; }
|
|
public Guid TeacherId { get; set; }
|
|
public string TeacherName { get; set; }
|
|
public DateTime ScheduledStartTime { get; set; }
|
|
public DateTime? ScheduledEndTime { get; set; }
|
|
public int Duration { get; set; }
|
|
public DateTime? ActualStartTime { get; set; }
|
|
public DateTime? ActualEndTime { get; set; }
|
|
public int MaxParticipants { get; set; }
|
|
public int ParticipantCount { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public string SettingsJson { get; set; }
|
|
public ClassroomSettingsDto SettingsDto
|
|
{
|
|
get
|
|
{
|
|
if (!string.IsNullOrEmpty(SettingsJson))
|
|
return JsonSerializer.Deserialize<ClassroomSettingsDto>(SettingsJson);
|
|
|
|
return new ClassroomSettingsDto();
|
|
}
|
|
set { SettingsJson = JsonSerializer.Serialize(value); }
|
|
}
|
|
}
|
|
|
|
public class ClassroomSettingsDto
|
|
{
|
|
public bool AllowHandRaise { get; set; }
|
|
public bool AllowStudentChat { get; set; }
|
|
public bool AllowPrivateMessages { get; set; }
|
|
public bool AllowStudentScreenShare { get; set; }
|
|
public string DefaultMicrophoneState { get; set; } = "muted"; // 'muted' | 'unmuted'
|
|
public string DefaultCameraState { get; set; } = "off"; // 'on' | 'off'
|
|
public string DefaultLayout { get; set; } = "grid";
|
|
public bool AutoMuteNewParticipants { get; set; }
|
|
}
|
|
|
|
public class GetClassroomListDto : PagedAndSortedResultRequestDto
|
|
{
|
|
public bool? IsActive { get; set; }
|
|
public Guid? TeacherId { get; set; }
|
|
}
|
|
|
|
public class ClassroomAttendanceDto : EntityDto<Guid>
|
|
{
|
|
public Guid SessionId { get; set; }
|
|
public Guid StudentId { get; set; }
|
|
public string StudentName { get; set; }
|
|
public DateTime JoinTime { get; set; }
|
|
public DateTime? LeaveTime { get; set; }
|
|
public int TotalDurationMinutes { get; set; }
|
|
} |