using MongoDB.Bson; namespace adas_core.Domain.Models.MongoModels; /// /// Represents a notice, typically used to convey information, alerts, or messages within the application. /// public class Notice { public ObjectId Id { get; set; } public DateTime NoticeDate { get; set; } public string Description { get; set; } = string.Empty; public string NoticeType { get; set; } = string.Empty; public ObjectId DisplayId { get; set; } public List? StaffInfoList { get; set; } public bool IsFooterEnabled { get; set; } = true; /// /// Returns a string representation of the notice, including the date (only when set), display ID, type, and description. /// /// A formatted string prefixed with "Notice [" and containing the comma-separated notice details, omitting the date entry when NoticeDate equals . public override string ToString() { List items = []; if (NoticeDate != DateTime.MinValue) items.Add($"Date: {NoticeDate}"); items.Add($"DisplayId : {DisplayId}"); items.Add($"Type: {NoticeType}"); items.Add($"Description: {Description}"); return "Notice [" + string.Join(",", items) + "]"; } } /// /// Represents a data structure that contains information about a staff member. /// public class StaffInfo { public required string Role { get; set; } public required string Leader { get; set; } }