erp-platform/api/src/Kurs.Platform.Application.Contracts/Classroom/ClassroomDto.cs

64 lines
2.1 KiB
C#
Raw Normal View History

2025-08-25 18:01:57 +00:00
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
2025-08-25 18:01:57 +00:00
using Volo.Abp.Application.Dtos;
2025-08-26 05:59:39 +00:00
namespace Kurs.Platform.Classrooms;
2025-08-25 18:01:57 +00:00
2025-08-26 05:59:39 +00:00
public class ClassroomDto : FullAuditedEntityDto<Guid>
2025-08-25 18:01:57 +00:00
{
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; }
2025-08-28 11:53:47 +00:00
public DateTime? ScheduledEndTime { get; set; }
2025-08-25 18:01:57 +00:00
public int Duration { get; set; }
2025-08-28 11:53:47 +00:00
public DateTime? ActualStartTime { get; set; }
public DateTime? ActualEndTime { get; set; }
2025-08-25 18:01:57 +00:00
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); }
}
2025-08-25 18:01:57 +00:00
}
public class ClassroomSettingsDto
2025-08-25 18:01:57 +00:00
{
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; }
2025-08-25 18:01:57 +00:00
}
2025-08-26 05:59:39 +00:00
public class GetClassroomListDto : PagedAndSortedResultRequestDto
2025-08-25 18:01:57 +00:00
{
public bool? IsActive { get; set; }
public Guid? TeacherId { get; set; }
}
2025-08-29 09:37:38 +00:00
public class ClassroomAttendanceDto : EntityDto<Guid>
2025-08-25 18:01:57 +00:00
{
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; }
}