using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace RobotNet10.MapManager.Data;
///
/// Node entity - Waypoints/nodes on the map
/// Maps to VDMA LIF: layouts[].nodes[]
///
[Table("Nodes")]
public class Node
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public Guid Id { get; set; }
///
/// Parent level reference
///
[Required]
public Guid LevelId { get; set; }
///
/// Node identifier (VDMA LIF: nodeId) - Required
/// Unique within level
///
[Required]
[StringLength(128)]
public string NodeId { get; set; } = string.Empty;
///
/// Node name (VDMA LIF: nodeName) - Optional
///
[StringLength(256)]
public string? NodeName { get; set; }
///
/// Node description (VDMA LIF: nodeDescription) - Optional
///
public string? NodeDescription { get; set; }
///
/// Map identifier (VDMA LIF: mapId) - Optional
/// Reference to map image or data
///
[StringLength(128)]
public string? MapId { get; set; }
///
/// X coordinate in meters (VDMA LIF: nodePosition.x) - Required
///
[Required]
public double X { get; set; }
///
/// Y coordinate in meters (VDMA LIF: nodePosition.y) - Required
///
[Required]
public double Y { get; set; }
// Navigation properties
[ForeignKey(nameof(LevelId))]
public virtual LayoutLevel Level { get; set; } = null!;
public virtual ICollection VehicleProperties { get; set; } = new List();
public virtual ICollection OutgoingEdges { get; set; } = new List();
public virtual ICollection IncomingEdges { get; set; } = new List();
public virtual ICollection StationInteractions { get; set; } = new List();
}