// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using RobotNet.RobotManager.Data;

#nullable disable

namespace RobotNet.RobotManager.Data.Migrations
{
    [DbContext(typeof(RobotEditorDbContext))]
    [Migration("20250509071716_fixRobotDb")]
    partial class fixRobotDb
    {
        /// <inheritdoc />
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "9.0.4")
                .HasAnnotation("Relational:MaxIdentifierLength", 128);

            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);

            modelBuilder.Entity("RobotNet.RobotManager.Data.Robot", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier")
                        .HasColumnName("Id");

                    b.Property<string>("ChargerNode")
                        .HasColumnType("varchar(127)")
                        .HasColumnName("ChargerNode");

                    b.Property<string>("HomeNode")
                        .HasColumnType("varchar(127)")
                        .HasColumnName("HomeNode");

                    b.Property<Guid>("MapId")
                        .HasColumnType("uniqueidentifier")
                        .HasColumnName("MapId");

                    b.Property<Guid>("ModelId")
                        .HasColumnType("uniqueidentifier")
                        .HasColumnName("ModelId");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("varchar(127)")
                        .HasColumnName("Name");

                    b.Property<string>("RobotId")
                        .IsRequired()
                        .HasColumnType("varchar(127)")
                        .HasColumnName("RobotId");

                    b.HasKey("Id");

                    b.HasIndex("ModelId");

                    b.ToTable("Robots");
                });

            modelBuilder.Entity("RobotNet.RobotManager.Data.RobotModel", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uniqueidentifier")
                        .HasColumnName("Id");

                    b.Property<int>("ImageHeight")
                        .HasColumnType("int")
                        .HasColumnName("ImageHeight");

                    b.Property<int>("ImageWidth")
                        .HasColumnType("int")
                        .HasColumnName("ImageWidth");

                    b.Property<double>("Length")
                        .HasColumnType("float")
                        .HasColumnName("Length");

                    b.Property<string>("ModelName")
                        .IsRequired()
                        .HasColumnType("varchar(127)")
                        .HasColumnName("ModelName");

                    b.Property<int>("NavigationType")
                        .HasColumnType("int")
                        .HasColumnName("NavigationType");

                    b.Property<double>("OriginX")
                        .HasColumnType("float")
                        .HasColumnName("OriginX");

                    b.Property<double>("OriginY")
                        .HasColumnType("float")
                        .HasColumnName("OriginY");

                    b.Property<double>("Width")
                        .HasColumnType("float")
                        .HasColumnName("Width");

                    b.HasKey("Id");

                    b.ToTable("RobotModels");
                });

            modelBuilder.Entity("RobotNet.RobotManager.Data.Robot", b =>
                {
                    b.HasOne("RobotNet.RobotManager.Data.RobotModel", "Model")
                        .WithMany("Robots")
                        .HasForeignKey("ModelId")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

                    b.Navigation("Model");
                });

            modelBuilder.Entity("RobotNet.RobotManager.Data.RobotModel", b =>
                {
                    b.Navigation("Robots");
                });
#pragma warning restore 612, 618
        }
    }
}
