//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using RobotNet10.MapManager.Data;
#nullable disable
namespace RobotNet10.FleetManager.Data.Migrations.MapDb
{
[DbContext(typeof(MapDbContext))]
partial class MapDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "10.0.3")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("RobotNet10.MapManager.Data.Edge", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("EdgeDescription")
.HasColumnType("nvarchar(max)");
b.Property("EdgeId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property("EdgeName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property("EndNodeId")
.HasColumnType("uniqueidentifier");
b.Property("LevelId")
.HasColumnType("uniqueidentifier");
b.Property("StartNodeId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("EdgeId");
b.HasIndex("EndNodeId");
b.HasIndex("StartNodeId");
b.HasIndex("LevelId", "EdgeId")
.IsUnique();
b.ToTable("Edges", t =>
{
t.HasCheckConstraint("CK_Edges_DifferentNodes", "[StartNodeId] <> [EndNodeId]");
});
});
modelBuilder.Entity("RobotNet10.MapManager.Data.EdgeVehicleProperty", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Actions")
.HasColumnType("nvarchar(max)");
b.Property("CorridorLeftWidth")
.HasColumnType("float");
b.Property("CorridorRefPoint")
.HasColumnType("int");
b.Property("CorridorRightWidth")
.HasColumnType("float");
b.Property("EdgeId")
.HasColumnType("uniqueidentifier");
b.Property("LoadRestriction_LoadSetNames")
.HasColumnType("nvarchar(max)");
b.Property("LoadRestriction_Loaded")
.HasColumnType("bit");
b.Property("LoadRestriction_Unloaded")
.HasColumnType("bit");
b.Property("MaxHeight")
.HasColumnType("float");
b.Property("MaxRotationSpeed")
.HasColumnType("float");
b.Property("MaxSpeed")
.HasColumnType("float");
b.Property("MinHeight")
.HasColumnType("float");
b.Property("OrientationType")
.HasColumnType("int");
b.Property("RotationAllowed")
.HasColumnType("bit");
b.Property("RotationAtEndNodeAllowed")
.HasColumnType("int");
b.Property("RotationAtStartNodeAllowed")
.HasColumnType("int");
b.Property("TrajectoryControlPoint1X")
.HasColumnType("float");
b.Property("TrajectoryControlPoint1Y")
.HasColumnType("float");
b.Property("TrajectoryControlPoint2X")
.HasColumnType("float");
b.Property("TrajectoryControlPoint2Y")
.HasColumnType("float");
b.Property("TrajectoryDegree")
.HasColumnType("int");
b.Property("VehicleOrientation")
.HasColumnType("float");
b.Property("VehicleTypeId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("EdgeId");
b.HasIndex("VehicleTypeId");
b.HasIndex("EdgeId", "VehicleTypeId")
.IsUnique();
b.ToTable("EdgeVehicleProperties");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.Layout", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreatedBy")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("IsActive")
.HasColumnType("bit");
b.Property("LayoutId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property("LayoutName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property("ModifiedBy")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.HasKey("Id");
b.HasIndex("IsActive");
b.HasIndex("LayoutId")
.IsUnique();
b.ToTable("Layouts");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.LayoutLevel", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("LayoutLevelId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property("LevelOrder")
.HasColumnType("int");
b.Property("VersionId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("LevelOrder");
b.HasIndex("VersionId", "LayoutLevelId")
.IsUnique();
b.ToTable("LayoutLevels");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.LayoutLevelEditorSettings", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("BoundsMaxX")
.HasColumnType("float");
b.Property("BoundsMaxY")
.HasColumnType("float");
b.Property("BoundsMinX")
.HasColumnType("float");
b.Property("BoundsMinY")
.HasColumnType("float");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("EdgeMinLengthCreate")
.HasColumnType("float");
b.Property("EdgeNameAutoGenerate")
.HasColumnType("bit");
b.Property("ImageHeight")
.HasColumnType("float");
b.Property("ImageWidth")
.HasColumnType("float");
b.Property("LevelId")
.HasColumnType("uniqueidentifier");
b.Property("ModifiedDate")
.HasColumnType("datetime2");
b.Property("NodeNameAutoGenerate")
.HasColumnType("bit");
b.Property("NodeProximityRadius")
.HasColumnType("float");
b.Property("OriginX")
.HasColumnType("float");
b.Property("OriginY")
.HasColumnType("float");
b.Property("Resolution")
.HasColumnType("float");
b.HasKey("Id");
b.HasIndex("LevelId")
.IsUnique();
b.ToTable("LayoutLevelEditorSettings");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.LayoutVersion", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("CreatedBy")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("IsActive")
.HasColumnType("bit");
b.Property("LayoutDescription")
.HasColumnType("nvarchar(max)");
b.Property("LayoutId")
.HasColumnType("uniqueidentifier");
b.Property("Version")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("nvarchar(32)");
b.HasKey("Id");
b.HasIndex("IsActive");
b.HasIndex("LayoutId", "Version")
.IsUnique();
b.ToTable("LayoutVersions");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.Node", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("LevelId")
.HasColumnType("uniqueidentifier");
b.Property("MapId")
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property("NodeDescription")
.HasColumnType("nvarchar(max)");
b.Property("NodeId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property("NodeName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property("X")
.HasColumnType("float");
b.Property("Y")
.HasColumnType("float");
b.HasKey("Id");
b.HasIndex("MapId");
b.HasIndex("NodeId");
b.HasIndex("LevelId", "NodeId")
.IsUnique();
b.HasIndex("X", "Y");
b.ToTable("Nodes");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.NodeVehicleProperty", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Actions")
.HasColumnType("nvarchar(max)");
b.Property("AllowedDeviationTheta")
.HasColumnType("float");
b.Property("AllowedDeviationXY")
.HasColumnType("float");
b.Property("NodeId")
.HasColumnType("uniqueidentifier");
b.Property("Theta")
.HasColumnType("float");
b.Property("VehicleTypeId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("NodeId");
b.HasIndex("VehicleTypeId");
b.HasIndex("NodeId", "VehicleTypeId")
.IsUnique();
b.ToTable("NodeVehicleProperties");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.Station", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("LevelId")
.HasColumnType("uniqueidentifier");
b.Property("StationDescription")
.HasColumnType("nvarchar(max)");
b.Property("StationHeight")
.HasColumnType("float");
b.Property("StationId")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("nvarchar(128)");
b.Property("StationName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property("Theta")
.HasColumnType("float");
b.Property("X")
.HasColumnType("float");
b.Property("Y")
.HasColumnType("float");
b.HasKey("Id");
b.HasIndex("StationId");
b.HasIndex("LevelId", "StationId")
.IsUnique();
b.ToTable("Stations");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.StationInteractionNode", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("NodeId")
.HasColumnType("uniqueidentifier");
b.Property("StationId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("NodeId");
b.HasIndex("StationId");
b.HasIndex("StationId", "NodeId")
.IsUnique();
b.ToTable("StationInteractionNodes");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.VehicleType", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property("Actions")
.HasColumnType("nvarchar(max)");
b.Property("CreatedDate")
.HasColumnType("datetime2");
b.Property("Description")
.HasColumnType("nvarchar(max)");
b.Property("IsActive")
.HasColumnType("bit");
b.Property("Specifications")
.HasColumnType("nvarchar(max)");
b.Property("VehicleTypeId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property("VehicleTypeName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.HasKey("Id");
b.HasIndex("IsActive");
b.HasIndex("VehicleTypeId")
.IsUnique();
b.ToTable("VehicleTypes");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.Edge", b =>
{
b.HasOne("RobotNet10.MapManager.Data.Node", "EndNode")
.WithMany("IncomingEdges")
.HasForeignKey("EndNodeId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("RobotNet10.MapManager.Data.LayoutLevel", "Level")
.WithMany("Edges")
.HasForeignKey("LevelId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("RobotNet10.MapManager.Data.Node", "StartNode")
.WithMany("OutgoingEdges")
.HasForeignKey("StartNodeId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("EndNode");
b.Navigation("Level");
b.Navigation("StartNode");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.EdgeVehicleProperty", b =>
{
b.HasOne("RobotNet10.MapManager.Data.Edge", "Edge")
.WithMany("VehicleProperties")
.HasForeignKey("EdgeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("RobotNet10.MapManager.Data.VehicleType", "VehicleType")
.WithMany("EdgeVehicleProperties")
.HasForeignKey("VehicleTypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Edge");
b.Navigation("VehicleType");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.LayoutLevel", b =>
{
b.HasOne("RobotNet10.MapManager.Data.LayoutVersion", "Version")
.WithMany("Levels")
.HasForeignKey("VersionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Version");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.LayoutLevelEditorSettings", b =>
{
b.HasOne("RobotNet10.MapManager.Data.LayoutLevel", "Level")
.WithOne("EditorSettings")
.HasForeignKey("RobotNet10.MapManager.Data.LayoutLevelEditorSettings", "LevelId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Level");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.LayoutVersion", b =>
{
b.HasOne("RobotNet10.MapManager.Data.Layout", "Layout")
.WithMany("Versions")
.HasForeignKey("LayoutId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Layout");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.Node", b =>
{
b.HasOne("RobotNet10.MapManager.Data.LayoutLevel", "Level")
.WithMany("Nodes")
.HasForeignKey("LevelId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Level");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.NodeVehicleProperty", b =>
{
b.HasOne("RobotNet10.MapManager.Data.Node", "Node")
.WithMany("VehicleProperties")
.HasForeignKey("NodeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("RobotNet10.MapManager.Data.VehicleType", "VehicleType")
.WithMany("NodeVehicleProperties")
.HasForeignKey("VehicleTypeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Node");
b.Navigation("VehicleType");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.Station", b =>
{
b.HasOne("RobotNet10.MapManager.Data.LayoutLevel", "Level")
.WithMany("Stations")
.HasForeignKey("LevelId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Level");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.StationInteractionNode", b =>
{
b.HasOne("RobotNet10.MapManager.Data.Node", "Node")
.WithMany("StationInteractions")
.HasForeignKey("NodeId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("RobotNet10.MapManager.Data.Station", "Station")
.WithMany("InteractionNodes")
.HasForeignKey("StationId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Node");
b.Navigation("Station");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.Edge", b =>
{
b.Navigation("VehicleProperties");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.Layout", b =>
{
b.Navigation("Versions");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.LayoutLevel", b =>
{
b.Navigation("Edges");
b.Navigation("EditorSettings");
b.Navigation("Nodes");
b.Navigation("Stations");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.LayoutVersion", b =>
{
b.Navigation("Levels");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.Node", b =>
{
b.Navigation("IncomingEdges");
b.Navigation("OutgoingEdges");
b.Navigation("StationInteractions");
b.Navigation("VehicleProperties");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.Station", b =>
{
b.Navigation("InteractionNodes");
});
modelBuilder.Entity("RobotNet10.MapManager.Data.VehicleType", b =>
{
b.Navigation("EdgeVehicleProperties");
b.Navigation("NodeVehicleProperties");
});
#pragma warning restore 612, 618
}
}
}