erp-platform/api/src/Kurs.Platform.Domain/Classroom/Classroom.cs
2025-08-31 23:26:49 +03:00

65 lines
2.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using Volo.Abp.Domain.Entities.Auditing;
namespace Kurs.Platform.Entities;
public class Classroom : FullAuditedEntity<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; }
public string SettingsJson { get; set; }
[JsonIgnore]
public virtual ICollection<ClassroomParticipant> Participants { get; set; }
public virtual ICollection<ClassroomAttandance> AttendanceRecords { get; set; }
public virtual ICollection<ClassroomChat> ChatMessages { get; set; }
protected Classroom()
{
Participants = new HashSet<ClassroomParticipant>();
AttendanceRecords = new HashSet<ClassroomAttandance>();
ChatMessages = new HashSet<ClassroomChat>();
}
public Classroom(
Guid id,
string name,
string description,
string subject,
Guid? teacherId,
string teacherName,
DateTime scheduledStartTime,
DateTime? scheduledEndTime,
int duration,
int maxParticipants,
string settingsJson
) : base(id)
{
Name = name;
Description = description;
Subject = subject;
TeacherId = teacherId;
TeacherName = teacherName;
ScheduledStartTime = scheduledStartTime;
ScheduledEndTime = scheduledEndTime;
Duration = duration;
MaxParticipants = maxParticipants;
SettingsJson = settingsJson;
Participants = new HashSet<ClassroomParticipant>();
AttendanceRecords = new HashSet<ClassroomAttandance>();
ChatMessages = new HashSet<ClassroomChat>();
}
}