diff --git a/backend/api/Migrations/20231002084005_InitialCreate.Designer.cs b/backend/api/Migrations/20231002084005_InitialCreate.Designer.cs
deleted file mode 100644
index 2741a60bf..000000000
--- a/backend/api/Migrations/20231002084005_InitialCreate.Designer.cs
+++ /dev/null
@@ -1,1195 +0,0 @@
-//
-using System;
-using Api.Database.Context;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-
-#nullable disable
-
-namespace Api.Migrations
-{
- [DbContext(typeof(FlotillaDbContext))]
- [Migration("20231002084005_InitialCreate")]
- partial class InitialCreate
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "7.0.11")
- .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
- NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
- modelBuilder.Entity("Api.Database.Models.Area", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("DeckId")
- .HasColumnType("text");
-
- b.Property("InstallationId")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("PlantId")
- .IsRequired()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.HasIndex("DeckId");
-
- b.HasIndex("InstallationId");
-
- b.HasIndex("PlantId");
-
- b.ToTable("Areas");
- });
-
- modelBuilder.Entity("Api.Database.Models.Deck", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("InstallationId")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("PlantId")
- .IsRequired()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.HasIndex("InstallationId");
-
- b.HasIndex("PlantId");
-
- b.ToTable("Decks");
- });
-
- modelBuilder.Entity("Api.Database.Models.Installation", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("InstallationCode")
- .IsRequired()
- .HasMaxLength(10)
- .HasColumnType("character varying(10)");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.HasKey("Id");
-
- b.HasIndex("InstallationCode")
- .IsUnique();
-
- b.ToTable("Installations");
- });
-
- modelBuilder.Entity("Api.Database.Models.MissionDefinition", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("AreaId")
- .HasColumnType("text");
-
- b.Property("Comment")
- .HasMaxLength(1000)
- .HasColumnType("character varying(1000)");
-
- b.Property("InspectionFrequency")
- .HasColumnType("bigint");
-
- b.Property("InstallationCode")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("IsDeprecated")
- .HasColumnType("boolean");
-
- b.Property("LastRunId")
- .HasColumnType("text");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("SourceId")
- .IsRequired()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.HasIndex("AreaId");
-
- b.HasIndex("LastRunId");
-
- b.HasIndex("SourceId");
-
- b.ToTable("MissionDefinitions");
- });
-
- modelBuilder.Entity("Api.Database.Models.MissionRun", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("AreaId")
- .HasColumnType("text");
-
- b.Property("Comment")
- .HasMaxLength(1000)
- .HasColumnType("character varying(1000)");
-
- b.Property("Description")
- .HasMaxLength(450)
- .HasColumnType("character varying(450)");
-
- b.Property("DesiredStartTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("EndTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("EstimatedDuration")
- .HasColumnType("bigint");
-
- b.Property("InstallationCode")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("IsarMissionId")
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("MissionId")
- .HasColumnType("text");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("RobotId")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("StartTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Status")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("StatusReason")
- .HasMaxLength(450)
- .HasColumnType("character varying(450)");
-
- b.HasKey("Id");
-
- b.HasIndex("AreaId");
-
- b.HasIndex("RobotId");
-
- b.ToTable("MissionRuns");
- });
-
- modelBuilder.Entity("Api.Database.Models.Plant", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("InstallationId")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("PlantCode")
- .IsRequired()
- .HasMaxLength(10)
- .HasColumnType("character varying(10)");
-
- b.HasKey("Id");
-
- b.HasIndex("InstallationId");
-
- b.HasIndex("PlantCode")
- .IsUnique();
-
- b.ToTable("Plants");
- });
-
- modelBuilder.Entity("Api.Database.Models.Robot", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("BatteryLevel")
- .HasColumnType("real");
-
- b.Property("CurrentAreaId")
- .HasColumnType("text");
-
- b.Property("CurrentInstallation")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("CurrentMissionId")
- .HasColumnType("text");
-
- b.Property("Enabled")
- .HasColumnType("boolean");
-
- b.Property("Host")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("IsarId")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("ModelId")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("Port")
- .HasColumnType("integer");
-
- b.Property("PressureLevel")
- .HasColumnType("real");
-
- b.Property("SerialNumber")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("Status")
- .IsRequired()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.HasIndex("CurrentAreaId");
-
- b.HasIndex("ModelId");
-
- b.ToTable("Robots");
- });
-
- modelBuilder.Entity("Api.Database.Models.RobotBatteryTimeseries", b =>
- {
- b.Property("BatteryLevel")
- .HasColumnType("real");
-
- b.Property("MissionId")
- .HasColumnType("text");
-
- b.Property("RobotId")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Time")
- .HasColumnType("timestamp with time zone");
-
- b.ToTable("RobotBatteryTimeseries");
- });
-
- modelBuilder.Entity("Api.Database.Models.RobotModel", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("AverageDurationPerTag")
- .HasColumnType("real");
-
- b.Property("BatteryWarningThreshold")
- .HasColumnType("real");
-
- b.Property("LowerPressureWarningThreshold")
- .HasColumnType("real");
-
- b.Property("Type")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpperPressureWarningThreshold")
- .HasColumnType("real");
-
- b.HasKey("Id");
-
- b.HasIndex("Type")
- .IsUnique();
-
- b.ToTable("RobotModels");
- });
-
- modelBuilder.Entity("Api.Database.Models.RobotPoseTimeseries", b =>
- {
- b.Property("MissionId")
- .HasColumnType("text");
-
- b.Property("OrientationW")
- .HasColumnType("real");
-
- b.Property("OrientationX")
- .HasColumnType("real");
-
- b.Property("OrientationY")
- .HasColumnType("real");
-
- b.Property("OrientationZ")
- .HasColumnType("real");
-
- b.Property("PositionX")
- .HasColumnType("real");
-
- b.Property("PositionY")
- .HasColumnType("real");
-
- b.Property("PositionZ")
- .HasColumnType("real");
-
- b.Property("RobotId")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Time")
- .HasColumnType("timestamp with time zone");
-
- b.ToTable("RobotPoseTimeseries");
- });
-
- modelBuilder.Entity("Api.Database.Models.RobotPressureTimeseries", b =>
- {
- b.Property("MissionId")
- .HasColumnType("text");
-
- b.Property("Pressure")
- .HasColumnType("real");
-
- b.Property("RobotId")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Time")
- .HasColumnType("timestamp with time zone");
-
- b.ToTable("RobotPressureTimeseries");
- });
-
- modelBuilder.Entity("Api.Database.Models.SafePosition", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("AreaId")
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.HasIndex("AreaId");
-
- b.ToTable("SafePositions");
- });
-
- modelBuilder.Entity("Api.Database.Models.Source", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("SourceId")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Type")
- .IsRequired()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.ToTable("Sources");
- });
-
- modelBuilder.Entity("Api.Database.Models.Area", b =>
- {
- b.HasOne("Api.Database.Models.Deck", "Deck")
- .WithMany()
- .HasForeignKey("DeckId")
- .OnDelete(DeleteBehavior.Restrict);
-
- b.HasOne("Api.Database.Models.Installation", "Installation")
- .WithMany()
- .HasForeignKey("InstallationId")
- .OnDelete(DeleteBehavior.Restrict)
- .IsRequired();
-
- b.HasOne("Api.Database.Models.Plant", "Plant")
- .WithMany()
- .HasForeignKey("PlantId")
- .OnDelete(DeleteBehavior.Restrict)
- .IsRequired();
-
- b.OwnsOne("Api.Database.Models.Pose", "DefaultLocalizationPose", b1 =>
- {
- b1.Property("AreaId")
- .HasColumnType("text");
-
- b1.HasKey("AreaId");
-
- b1.ToTable("Areas");
-
- b1.WithOwner()
- .HasForeignKey("AreaId");
-
- b1.OwnsOne("Api.Database.Models.Orientation", "Orientation", b2 =>
- {
- b2.Property("PoseAreaId")
- .HasColumnType("text");
-
- b2.Property("W")
- .HasColumnType("real");
-
- b2.Property("X")
- .HasColumnType("real");
-
- b2.Property("Y")
- .HasColumnType("real");
-
- b2.Property("Z")
- .HasColumnType("real");
-
- b2.HasKey("PoseAreaId");
-
- b2.ToTable("Areas");
-
- b2.WithOwner()
- .HasForeignKey("PoseAreaId");
- });
-
- b1.OwnsOne("Api.Database.Models.Position", "Position", b2 =>
- {
- b2.Property("PoseAreaId")
- .HasColumnType("text");
-
- b2.Property("X")
- .HasColumnType("real");
-
- b2.Property("Y")
- .HasColumnType("real");
-
- b2.Property("Z")
- .HasColumnType("real");
-
- b2.HasKey("PoseAreaId");
-
- b2.ToTable("Areas");
-
- b2.WithOwner()
- .HasForeignKey("PoseAreaId");
- });
-
- b1.Navigation("Orientation")
- .IsRequired();
-
- b1.Navigation("Position")
- .IsRequired();
- });
-
- b.OwnsOne("Api.Database.Models.MapMetadata", "MapMetadata", b1 =>
- {
- b1.Property("AreaId")
- .HasColumnType("text");
-
- b1.Property("MapName")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b1.HasKey("AreaId");
-
- b1.ToTable("Areas");
-
- b1.WithOwner()
- .HasForeignKey("AreaId");
-
- b1.OwnsOne("Api.Database.Models.Boundary", "Boundary", b2 =>
- {
- b2.Property("MapMetadataAreaId")
- .HasColumnType("text");
-
- b2.Property("X1")
- .HasColumnType("double precision");
-
- b2.Property("X2")
- .HasColumnType("double precision");
-
- b2.Property("Y1")
- .HasColumnType("double precision");
-
- b2.Property("Y2")
- .HasColumnType("double precision");
-
- b2.Property("Z1")
- .HasColumnType("double precision");
-
- b2.Property("Z2")
- .HasColumnType("double precision");
-
- b2.HasKey("MapMetadataAreaId");
-
- b2.ToTable("Areas");
-
- b2.WithOwner()
- .HasForeignKey("MapMetadataAreaId");
- });
-
- b1.OwnsOne("Api.Database.Models.TransformationMatrices", "TransformationMatrices", b2 =>
- {
- b2.Property("MapMetadataAreaId")
- .HasColumnType("text");
-
- b2.Property("C1")
- .HasColumnType("double precision");
-
- b2.Property("C2")
- .HasColumnType("double precision");
-
- b2.Property("D1")
- .HasColumnType("double precision");
-
- b2.Property("D2")
- .HasColumnType("double precision");
-
- b2.HasKey("MapMetadataAreaId");
-
- b2.ToTable("Areas");
-
- b2.WithOwner()
- .HasForeignKey("MapMetadataAreaId");
- });
-
- b1.Navigation("Boundary")
- .IsRequired();
-
- b1.Navigation("TransformationMatrices")
- .IsRequired();
- });
-
- b.Navigation("Deck");
-
- b.Navigation("DefaultLocalizationPose")
- .IsRequired();
-
- b.Navigation("Installation");
-
- b.Navigation("MapMetadata")
- .IsRequired();
-
- b.Navigation("Plant");
- });
-
- modelBuilder.Entity("Api.Database.Models.Deck", b =>
- {
- b.HasOne("Api.Database.Models.Installation", "Installation")
- .WithMany()
- .HasForeignKey("InstallationId")
- .OnDelete(DeleteBehavior.Restrict)
- .IsRequired();
-
- b.HasOne("Api.Database.Models.Plant", "Plant")
- .WithMany()
- .HasForeignKey("PlantId")
- .OnDelete(DeleteBehavior.Restrict)
- .IsRequired();
-
- b.Navigation("Installation");
-
- b.Navigation("Plant");
- });
-
- modelBuilder.Entity("Api.Database.Models.MissionDefinition", b =>
- {
- b.HasOne("Api.Database.Models.Area", "Area")
- .WithMany()
- .HasForeignKey("AreaId");
-
- b.HasOne("Api.Database.Models.MissionRun", "LastRun")
- .WithMany()
- .HasForeignKey("LastRunId");
-
- b.HasOne("Api.Database.Models.Source", "Source")
- .WithMany()
- .HasForeignKey("SourceId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Area");
-
- b.Navigation("LastRun");
-
- b.Navigation("Source");
- });
-
- modelBuilder.Entity("Api.Database.Models.MissionRun", b =>
- {
- b.HasOne("Api.Database.Models.Area", "Area")
- .WithMany()
- .HasForeignKey("AreaId");
-
- b.HasOne("Api.Database.Models.Robot", "Robot")
- .WithMany()
- .HasForeignKey("RobotId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.OwnsOne("Api.Database.Models.MapMetadata", "Map", b1 =>
- {
- b1.Property("MissionRunId")
- .HasColumnType("text");
-
- b1.Property("MapName")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b1.HasKey("MissionRunId");
-
- b1.ToTable("MissionRuns");
-
- b1.WithOwner()
- .HasForeignKey("MissionRunId");
-
- b1.OwnsOne("Api.Database.Models.Boundary", "Boundary", b2 =>
- {
- b2.Property("MapMetadataMissionRunId")
- .HasColumnType("text");
-
- b2.Property("X1")
- .HasColumnType("double precision");
-
- b2.Property("X2")
- .HasColumnType("double precision");
-
- b2.Property("Y1")
- .HasColumnType("double precision");
-
- b2.Property("Y2")
- .HasColumnType("double precision");
-
- b2.Property("Z1")
- .HasColumnType("double precision");
-
- b2.Property("Z2")
- .HasColumnType("double precision");
-
- b2.HasKey("MapMetadataMissionRunId");
-
- b2.ToTable("MissionRuns");
-
- b2.WithOwner()
- .HasForeignKey("MapMetadataMissionRunId");
- });
-
- b1.OwnsOne("Api.Database.Models.TransformationMatrices", "TransformationMatrices", b2 =>
- {
- b2.Property("MapMetadataMissionRunId")
- .HasColumnType("text");
-
- b2.Property("C1")
- .HasColumnType("double precision");
-
- b2.Property("C2")
- .HasColumnType("double precision");
-
- b2.Property("D1")
- .HasColumnType("double precision");
-
- b2.Property("D2")
- .HasColumnType("double precision");
-
- b2.HasKey("MapMetadataMissionRunId");
-
- b2.ToTable("MissionRuns");
-
- b2.WithOwner()
- .HasForeignKey("MapMetadataMissionRunId");
- });
-
- b1.Navigation("Boundary")
- .IsRequired();
-
- b1.Navigation("TransformationMatrices")
- .IsRequired();
- });
-
- b.OwnsMany("Api.Database.Models.MissionTask", "Tasks", b1 =>
- {
- b1.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b1.Property("Description")
- .HasMaxLength(500)
- .HasColumnType("character varying(500)");
-
- b1.Property("EchoPoseId")
- .HasColumnType("integer");
-
- b1.Property("EchoTagLink")
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b1.Property("EndTime")
- .HasColumnType("timestamp with time zone");
-
- b1.Property("IsarTaskId")
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b1.Property("MissionRunId")
- .IsRequired()
- .HasColumnType("text");
-
- b1.Property("StartTime")
- .HasColumnType("timestamp with time zone");
-
- b1.Property("Status")
- .IsRequired()
- .HasColumnType("text");
-
- b1.Property("TagId")
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b1.Property("TaskOrder")
- .HasColumnType("integer");
-
- b1.HasKey("Id");
-
- b1.HasIndex("MissionRunId");
-
- b1.ToTable("MissionTask");
-
- b1.WithOwner()
- .HasForeignKey("MissionRunId");
-
- b1.OwnsMany("Api.Database.Models.Inspection", "Inspections", b2 =>
- {
- b2.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b2.Property("AnalysisType")
- .HasColumnType("text");
-
- b2.Property("EndTime")
- .HasColumnType("timestamp with time zone");
-
- b2.Property("InspectionType")
- .IsRequired()
- .HasColumnType("text");
-
- b2.Property("InspectionUrl")
- .HasMaxLength(250)
- .HasColumnType("character varying(250)");
-
- b2.Property("IsarStepId")
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b2.Property("MissionTaskId")
- .IsRequired()
- .HasColumnType("text");
-
- b2.Property("StartTime")
- .HasColumnType("timestamp with time zone");
-
- b2.Property("Status")
- .IsRequired()
- .HasColumnType("text");
-
- b2.Property("VideoDuration")
- .HasColumnType("real");
-
- b2.HasKey("Id");
-
- b2.HasIndex("MissionTaskId");
-
- b2.ToTable("Inspection");
-
- b2.WithOwner()
- .HasForeignKey("MissionTaskId");
- });
-
- b1.OwnsOne("Api.Database.Models.Position", "InspectionTarget", b2 =>
- {
- b2.Property("MissionTaskId")
- .HasColumnType("text");
-
- b2.Property("X")
- .HasColumnType("real");
-
- b2.Property("Y")
- .HasColumnType("real");
-
- b2.Property("Z")
- .HasColumnType("real");
-
- b2.HasKey("MissionTaskId");
-
- b2.ToTable("MissionTask");
-
- b2.WithOwner()
- .HasForeignKey("MissionTaskId");
- });
-
- b1.OwnsOne("Api.Database.Models.Pose", "RobotPose", b2 =>
- {
- b2.Property("MissionTaskId")
- .HasColumnType("text");
-
- b2.HasKey("MissionTaskId");
-
- b2.ToTable("MissionTask");
-
- b2.WithOwner()
- .HasForeignKey("MissionTaskId");
-
- b2.OwnsOne("Api.Database.Models.Orientation", "Orientation", b3 =>
- {
- b3.Property("PoseMissionTaskId")
- .HasColumnType("text");
-
- b3.Property("W")
- .HasColumnType("real");
-
- b3.Property("X")
- .HasColumnType("real");
-
- b3.Property("Y")
- .HasColumnType("real");
-
- b3.Property("Z")
- .HasColumnType("real");
-
- b3.HasKey("PoseMissionTaskId");
-
- b3.ToTable("MissionTask");
-
- b3.WithOwner()
- .HasForeignKey("PoseMissionTaskId");
- });
-
- b2.OwnsOne("Api.Database.Models.Position", "Position", b3 =>
- {
- b3.Property("PoseMissionTaskId")
- .HasColumnType("text");
-
- b3.Property("X")
- .HasColumnType("real");
-
- b3.Property("Y")
- .HasColumnType("real");
-
- b3.Property("Z")
- .HasColumnType("real");
-
- b3.HasKey("PoseMissionTaskId");
-
- b3.ToTable("MissionTask");
-
- b3.WithOwner()
- .HasForeignKey("PoseMissionTaskId");
- });
-
- b2.Navigation("Orientation")
- .IsRequired();
-
- b2.Navigation("Position")
- .IsRequired();
- });
-
- b1.Navigation("InspectionTarget")
- .IsRequired();
-
- b1.Navigation("Inspections");
-
- b1.Navigation("RobotPose")
- .IsRequired();
- });
-
- b.Navigation("Area");
-
- b.Navigation("Map");
-
- b.Navigation("Robot");
-
- b.Navigation("Tasks");
- });
-
- modelBuilder.Entity("Api.Database.Models.Plant", b =>
- {
- b.HasOne("Api.Database.Models.Installation", "Installation")
- .WithMany()
- .HasForeignKey("InstallationId")
- .OnDelete(DeleteBehavior.Restrict)
- .IsRequired();
-
- b.Navigation("Installation");
- });
-
- modelBuilder.Entity("Api.Database.Models.Robot", b =>
- {
- b.HasOne("Api.Database.Models.Area", "CurrentArea")
- .WithMany()
- .HasForeignKey("CurrentAreaId");
-
- b.HasOne("Api.Database.Models.RobotModel", "Model")
- .WithMany()
- .HasForeignKey("ModelId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.OwnsOne("Api.Database.Models.Pose", "Pose", b1 =>
- {
- b1.Property("RobotId")
- .HasColumnType("text");
-
- b1.HasKey("RobotId");
-
- b1.ToTable("Robots");
-
- b1.WithOwner()
- .HasForeignKey("RobotId");
-
- b1.OwnsOne("Api.Database.Models.Orientation", "Orientation", b2 =>
- {
- b2.Property("PoseRobotId")
- .HasColumnType("text");
-
- b2.Property("W")
- .HasColumnType("real");
-
- b2.Property("X")
- .HasColumnType("real");
-
- b2.Property("Y")
- .HasColumnType("real");
-
- b2.Property("Z")
- .HasColumnType("real");
-
- b2.HasKey("PoseRobotId");
-
- b2.ToTable("Robots");
-
- b2.WithOwner()
- .HasForeignKey("PoseRobotId");
- });
-
- b1.OwnsOne("Api.Database.Models.Position", "Position", b2 =>
- {
- b2.Property("PoseRobotId")
- .HasColumnType("text");
-
- b2.Property("X")
- .HasColumnType("real");
-
- b2.Property("Y")
- .HasColumnType("real");
-
- b2.Property("Z")
- .HasColumnType("real");
-
- b2.HasKey("PoseRobotId");
-
- b2.ToTable("Robots");
-
- b2.WithOwner()
- .HasForeignKey("PoseRobotId");
- });
-
- b1.Navigation("Orientation")
- .IsRequired();
-
- b1.Navigation("Position")
- .IsRequired();
- });
-
- b.OwnsMany("Api.Database.Models.VideoStream", "VideoStreams", b1 =>
- {
- b1.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b1.Property("Name")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b1.Property("RobotId")
- .IsRequired()
- .HasColumnType("text");
-
- b1.Property("ShouldRotate270Clockwise")
- .HasColumnType("boolean");
-
- b1.Property("Type")
- .IsRequired()
- .HasMaxLength(64)
- .HasColumnType("character varying(64)");
-
- b1.Property("Url")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b1.HasKey("Id");
-
- b1.HasIndex("RobotId");
-
- b1.ToTable("VideoStream");
-
- b1.WithOwner()
- .HasForeignKey("RobotId");
- });
-
- b.Navigation("CurrentArea");
-
- b.Navigation("Model");
-
- b.Navigation("Pose")
- .IsRequired();
-
- b.Navigation("VideoStreams");
- });
-
- modelBuilder.Entity("Api.Database.Models.SafePosition", b =>
- {
- b.HasOne("Api.Database.Models.Area", null)
- .WithMany("SafePositions")
- .HasForeignKey("AreaId");
-
- b.OwnsOne("Api.Database.Models.Pose", "Pose", b1 =>
- {
- b1.Property("SafePositionId")
- .HasColumnType("text");
-
- b1.HasKey("SafePositionId");
-
- b1.ToTable("SafePositions");
-
- b1.WithOwner()
- .HasForeignKey("SafePositionId");
-
- b1.OwnsOne("Api.Database.Models.Orientation", "Orientation", b2 =>
- {
- b2.Property("PoseSafePositionId")
- .HasColumnType("text");
-
- b2.Property("W")
- .HasColumnType("real");
-
- b2.Property("X")
- .HasColumnType("real");
-
- b2.Property("Y")
- .HasColumnType("real");
-
- b2.Property("Z")
- .HasColumnType("real");
-
- b2.HasKey("PoseSafePositionId");
-
- b2.ToTable("SafePositions");
-
- b2.WithOwner()
- .HasForeignKey("PoseSafePositionId");
- });
-
- b1.OwnsOne("Api.Database.Models.Position", "Position", b2 =>
- {
- b2.Property("PoseSafePositionId")
- .HasColumnType("text");
-
- b2.Property("X")
- .HasColumnType("real");
-
- b2.Property("Y")
- .HasColumnType("real");
-
- b2.Property("Z")
- .HasColumnType("real");
-
- b2.HasKey("PoseSafePositionId");
-
- b2.ToTable("SafePositions");
-
- b2.WithOwner()
- .HasForeignKey("PoseSafePositionId");
- });
-
- b1.Navigation("Orientation")
- .IsRequired();
-
- b1.Navigation("Position")
- .IsRequired();
- });
-
- b.Navigation("Pose")
- .IsRequired();
- });
-
- modelBuilder.Entity("Api.Database.Models.Area", b =>
- {
- b.Navigation("SafePositions");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/backend/api/Migrations/20231009102654_AddDefaultLocalizationPoseToDeckAndArea.Designer.cs b/backend/api/Migrations/20231009102654_AddDefaultLocalizationPoseToDeckAndArea.Designer.cs
deleted file mode 100644
index e81ee992a..000000000
--- a/backend/api/Migrations/20231009102654_AddDefaultLocalizationPoseToDeckAndArea.Designer.cs
+++ /dev/null
@@ -1,1231 +0,0 @@
-//
-using System;
-using Api.Database.Context;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-
-#nullable disable
-
-namespace Api.Migrations
-{
- [DbContext(typeof(FlotillaDbContext))]
- [Migration("20231009102654_AddDefaultLocalizationPoseToDeckAndArea")]
- partial class AddDefaultLocalizationPoseToDeckAndArea
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "7.0.11")
- .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
- NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
- modelBuilder.Entity("Api.Database.Models.Area", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("DeckId")
- .HasColumnType("text");
-
- b.Property("DefaultLocalizationPoseId")
- .HasColumnType("text");
-
- b.Property("InstallationId")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("PlantId")
- .IsRequired()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.HasIndex("DeckId");
-
- b.HasIndex("DefaultLocalizationPoseId");
-
- b.HasIndex("InstallationId");
-
- b.HasIndex("PlantId");
-
- b.ToTable("Areas");
- });
-
- modelBuilder.Entity("Api.Database.Models.Deck", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("DefaultLocalizationPoseId")
- .HasColumnType("text");
-
- b.Property("InstallationId")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("PlantId")
- .IsRequired()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.HasIndex("DefaultLocalizationPoseId");
-
- b.HasIndex("InstallationId");
-
- b.HasIndex("PlantId");
-
- b.ToTable("Decks");
- });
-
- modelBuilder.Entity("Api.Database.Models.DefaultLocalizationPose", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.ToTable("DefaultLocalizationPoses");
- });
-
- modelBuilder.Entity("Api.Database.Models.Installation", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("InstallationCode")
- .IsRequired()
- .HasMaxLength(10)
- .HasColumnType("character varying(10)");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.HasKey("Id");
-
- b.HasIndex("InstallationCode")
- .IsUnique();
-
- b.ToTable("Installations");
- });
-
- modelBuilder.Entity("Api.Database.Models.MissionDefinition", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("AreaId")
- .HasColumnType("text");
-
- b.Property("Comment")
- .HasMaxLength(1000)
- .HasColumnType("character varying(1000)");
-
- b.Property("InspectionFrequency")
- .HasColumnType("bigint");
-
- b.Property("InstallationCode")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("IsDeprecated")
- .HasColumnType("boolean");
-
- b.Property("LastRunId")
- .HasColumnType("text");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("SourceId")
- .IsRequired()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.HasIndex("AreaId");
-
- b.HasIndex("LastRunId");
-
- b.HasIndex("SourceId");
-
- b.ToTable("MissionDefinitions");
- });
-
- modelBuilder.Entity("Api.Database.Models.MissionRun", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("AreaId")
- .HasColumnType("text");
-
- b.Property("Comment")
- .HasMaxLength(1000)
- .HasColumnType("character varying(1000)");
-
- b.Property("Description")
- .HasMaxLength(450)
- .HasColumnType("character varying(450)");
-
- b.Property("DesiredStartTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("EndTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("EstimatedDuration")
- .HasColumnType("bigint");
-
- b.Property("InstallationCode")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("IsarMissionId")
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("MissionId")
- .HasColumnType("text");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("RobotId")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("StartTime")
- .HasColumnType("timestamp with time zone");
-
- b.Property("Status")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("StatusReason")
- .HasMaxLength(450)
- .HasColumnType("character varying(450)");
-
- b.HasKey("Id");
-
- b.HasIndex("AreaId");
-
- b.HasIndex("RobotId");
-
- b.ToTable("MissionRuns");
- });
-
- modelBuilder.Entity("Api.Database.Models.Plant", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("InstallationId")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("PlantCode")
- .IsRequired()
- .HasMaxLength(10)
- .HasColumnType("character varying(10)");
-
- b.HasKey("Id");
-
- b.HasIndex("InstallationId");
-
- b.HasIndex("PlantCode")
- .IsUnique();
-
- b.ToTable("Plants");
- });
-
- modelBuilder.Entity("Api.Database.Models.Robot", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("BatteryLevel")
- .HasColumnType("real");
-
- b.Property("CurrentAreaId")
- .HasColumnType("text");
-
- b.Property("CurrentInstallation")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("CurrentMissionId")
- .HasColumnType("text");
-
- b.Property("Enabled")
- .HasColumnType("boolean");
-
- b.Property("Host")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("IsarId")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("ModelId")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("Port")
- .HasColumnType("integer");
-
- b.Property("PressureLevel")
- .HasColumnType("real");
-
- b.Property("SerialNumber")
- .IsRequired()
- .HasMaxLength(200)
- .HasColumnType("character varying(200)");
-
- b.Property("Status")
- .IsRequired()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.HasIndex("CurrentAreaId");
-
- b.HasIndex("ModelId");
-
- b.ToTable("Robots");
- });
-
- modelBuilder.Entity("Api.Database.Models.RobotBatteryTimeseries", b =>
- {
- b.Property("BatteryLevel")
- .HasColumnType("real");
-
- b.Property("MissionId")
- .HasColumnType("text");
-
- b.Property("RobotId")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Time")
- .HasColumnType("timestamp with time zone");
-
- b.ToTable("RobotBatteryTimeseries");
- });
-
- modelBuilder.Entity("Api.Database.Models.RobotModel", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("text");
-
- b.Property("AverageDurationPerTag")
- .HasColumnType("real");
-
- b.Property("BatteryWarningThreshold")
- .HasColumnType("real");
-
- b.Property("LowerPressureWarningThreshold")
- .HasColumnType("real");
-
- b.Property("Type")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpperPressureWarningThreshold")
- .HasColumnType("real");
-
- b.HasKey("Id");
-
- b.HasIndex("Type")
- .IsUnique();
-
- b.ToTable("RobotModels");
- });
-
- modelBuilder.Entity("Api.Database.Models.RobotPoseTimeseries", b =>
- {
- b.Property("MissionId")
- .HasColumnType("text");
-
- b.Property("OrientationW")
- .HasColumnType("real");
-
- b.Property("OrientationX")
- .HasColumnType("real");
-
- b.Property("OrientationY")
- .HasColumnType("real");
-
- b.Property("OrientationZ")
- .HasColumnType("real");
-
- b.Property