erp-platform/api/src/Kurs.Platform.Domain/Classroom/Classroom.cs

66 lines
2.1 KiB
C#
Raw Normal View History

2025-08-25 18:01:57 +00:00
using System;
using System.Collections.Generic;
2025-08-31 20:26:49 +00:00
using System.Text.Json.Serialization;
2025-08-25 18:01:57 +00:00
using Volo.Abp.Domain.Entities.Auditing;
namespace Kurs.Platform.Entities;
2025-08-26 05:59:39 +00:00
public class Classroom : FullAuditedEntity<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; }
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; }
public string SettingsJson { get; set; }
2025-08-25 18:01:57 +00:00
2025-08-31 20:26:49 +00:00
[JsonIgnore]
2025-08-29 09:37:38 +00:00
public virtual ICollection<ClassroomParticipant> Participants { get; set; }
public virtual ICollection<ClassroomAttandance> AttendanceRecords { get; set; }
public virtual ICollection<ClassroomChat> ChatMessages { get; set; }
2025-08-25 18:01:57 +00:00
2025-08-26 05:59:39 +00:00
protected Classroom()
2025-08-25 18:01:57 +00:00
{
2025-08-29 09:37:38 +00:00
Participants = new HashSet<ClassroomParticipant>();
AttendanceRecords = new HashSet<ClassroomAttandance>();
ChatMessages = new HashSet<ClassroomChat>();
2025-08-25 18:01:57 +00:00
}
2025-08-26 05:59:39 +00:00
public Classroom(
2025-08-25 18:01:57 +00:00
Guid id,
string name,
string description,
string subject,
Guid? teacherId,
string teacherName,
DateTime scheduledStartTime,
2025-08-28 11:53:47 +00:00
DateTime? scheduledEndTime,
2025-08-25 18:01:57 +00:00
int duration,
int maxParticipants,
string settingsJson
2025-08-25 18:01:57 +00:00
) : base(id)
{
Name = name;
Description = description;
Subject = subject;
TeacherId = teacherId;
TeacherName = teacherName;
ScheduledStartTime = scheduledStartTime;
2025-08-28 11:53:47 +00:00
ScheduledEndTime = scheduledEndTime;
2025-08-25 18:01:57 +00:00
Duration = duration;
MaxParticipants = maxParticipants;
SettingsJson = settingsJson;
2025-08-25 18:01:57 +00:00
2025-08-29 09:37:38 +00:00
Participants = new HashSet<ClassroomParticipant>();
AttendanceRecords = new HashSet<ClassroomAttandance>();
ChatMessages = new HashSet<ClassroomChat>();
2025-08-25 18:01:57 +00:00
}
}