Initial commit
This commit is contained in:
68
srcs/RobotNet10/Commons/RobotNet10.MapManager/Data/Edge.cs
Normal file
68
srcs/RobotNet10/Commons/RobotNet10.MapManager/Data/Edge.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace RobotNet10.MapManager.Data;
|
||||
|
||||
/// <summary>
|
||||
/// Edge entity - Paths between nodes
|
||||
/// Maps to VDMA LIF: layouts[].edges[]
|
||||
/// </summary>
|
||||
[Table("Edges")]
|
||||
public class Edge
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Parent level reference
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid LevelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Edge identifier (VDMA LIF: edgeId) - Required
|
||||
/// Unique within level
|
||||
/// </summary>
|
||||
[Required]
|
||||
[StringLength(128)]
|
||||
public string EdgeId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Start node reference (VDMA LIF: startNodeId) - Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid StartNodeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// End node reference (VDMA LIF: endNodeId) - Required
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Guid EndNodeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Edge name - Extension field (NOT in VDMA LIF)
|
||||
/// For UI/display purposes only
|
||||
/// </summary>
|
||||
[StringLength(256)]
|
||||
public string? EdgeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Edge description - Extension field (NOT in VDMA LIF)
|
||||
/// For UI/display purposes only
|
||||
/// </summary>
|
||||
public string? EdgeDescription { get; set; }
|
||||
|
||||
// Navigation properties
|
||||
[ForeignKey(nameof(LevelId))]
|
||||
public virtual LayoutLevel Level { get; set; } = null!;
|
||||
|
||||
[ForeignKey(nameof(StartNodeId))]
|
||||
public virtual Node StartNode { get; set; } = null!;
|
||||
|
||||
[ForeignKey(nameof(EndNodeId))]
|
||||
public virtual Node EndNode { get; set; } = null!;
|
||||
|
||||
public virtual ICollection<EdgeVehicleProperty> VehicleProperties { get; set; } = new List<EdgeVehicleProperty>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user