using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace RobotNet10.MapManager.Data; /// /// Layout level entity - Represents floors/levels within a version /// Maps to VDMA LIF: layouts[].layoutLevelId /// [Table("LayoutLevels")] public class LayoutLevel { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public Guid Id { get; set; } /// /// Parent version reference /// [Required] public Guid VersionId { get; set; } /// /// Level identifier (VDMA LIF: layoutLevelId) /// Example: "floor_1", "floor_2", "basement" /// [Required] [StringLength(64)] public string LayoutLevelId { get; set; } = string.Empty; /// /// Display order (for sorting in UI) /// Example: Basement=-1, Floor1=0, Floor2=1 /// [Required] public int LevelOrder { get; set; } = 0; // Navigation properties [ForeignKey(nameof(VersionId))] public virtual LayoutVersion Version { get; set; } = null!; public virtual ICollection Nodes { get; set; } = new List(); public virtual ICollection Edges { get; set; } = new List(); public virtual ICollection Stations { get; set; } = new List(); /// /// Editor-specific settings (UI extensions, not part of VDMA LIF) /// public virtual LayoutLevelEditorSettings? EditorSettings { get; set; } }