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