using Jiaowu.Api.Domain.Common; namespace Jiaowu.Api.Domain.Academic; public sealed class Notification : EntityBase { public Guid UserId { get; set; } public required string Title { get; set; } public required string Content { get; set; } public NotificationCategory Category { get; set; } = NotificationCategory.General; public bool IsRead { get; set; } public string? LinkUrl { get; set; } public Guid? MessageDispatchId { get; set; } public MessageDispatch? MessageDispatch { get; set; } } public sealed class MessageDispatch : EntityBase { public Guid SenderUserId { get; set; } public required string SenderName { get; set; } public required string Title { get; set; } public required string Content { get; set; } public NotificationCategory Category { get; set; } = NotificationCategory.General; public MessageAudienceType AudienceType { get; set; } public Guid? AudienceId { get; set; } public required string AudienceName { get; set; } public int RecipientCount { get; set; } public string? LinkUrl { get; set; } public ICollection Notifications { get; set; } = []; } public enum NotificationCategory { General = 1, Approval = 2, Schedule = 3, Grade = 4, Attendance = 5, CourseSelection = 6, Warning = 7 } public enum MessageAudienceType { School = 1, College = 2, TeachingTask = 3, Custom = 4 }