using adas_core.Domain.Enums; using MongoDB.Bson; namespace adas_core.Domain.Models.MongoModels; /// /// Represents a section, typically used to group or encapsulate a distinct portion of related content or functionality within a larger structure. /// public class Section { // ReSharper disable once InconsistentNaming public ObjectId _id { get; set; } public string Id { get; set; } = string.Empty; public string? SectionTitle { get; set; } public string? PointOfCare { get; set; } public DateTime? LastUpdate { get; set; } public Dictionary Configuration { get; set; } = []; public SectionConfig? SectionConfig { get; set; } public UiFontData? DesignProperties { get; set; } public Dictionary> PointOfCareList { get; set; } = new(); public List Items { get; set; } = []; public StatusEnum.Type? Status { get; set; } = null; /// /// Determines whether the current is equal to another by comparing their identifiers. /// Returns false when the supplied instance is null, so no exception is raised for null inputs. /// /// The instance to compare with the current one. /// true if both sections share the same ; otherwise, false. public bool Equals(Section? other) { return other != null && Id == other.Id; } /// /// Returns a string representation of the Section, including its identifier. /// /// A string formatted as "[Section id: {Id}]" containing the section's identifier. public override string ToString() { return "[Section id: " + Id + "]"; } /// /// Represents an individual item within a section, encapsulating the data and behavior associated with that entry. /// public class SectionItem { public string? Group { get; set; } public List Boxes { get; set; } = []; } }