// <auto-generated />
using System;
using System.Collections.Generic;
using GeoRitmMover.Mover.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

#nullable disable

namespace GeoRitmMover.Mover.Data.Migrations
{
    [DbContext(typeof(MoverDbContext))]
    [Migration("20241112113951_AddAccesses")]
    partial class AddAccesses
    {
        /// <inheritdoc />
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "8.0.10")
                .HasAnnotation("Relational:MaxIdentifierLength", 63);

            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

            modelBuilder.Entity("GeoRitmMover.Mover.Data.AccessMap", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<Guid>("To")
                        .HasColumnType("uuid");

                    b.ComplexProperty<Dictionary<string, object>>("From", "GeoRitmMover.Mover.Data.AccessMap.From#UserInventory", b1 =>
                        {
                            b1.IsRequired();

                            b1.Property<int>("InventoryId")
                                .HasColumnType("integer");

                            b1.Property<int>("UserId")
                                .HasColumnType("integer");
                        });

                    b.HasKey("Id");

                    b.HasIndex("To")
                        .IsUnique();

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

            modelBuilder.Entity("GeoRitmMover.Mover.Data.AreaMap", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<int>("From")
                        .HasColumnType("integer");

                    b.Property<Guid>("To")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("From")
                        .IsUnique();

                    b.HasIndex("To")
                        .IsUnique();

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

            modelBuilder.Entity("GeoRitmMover.Mover.Data.AssetGroupMap", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<int>("From")
                        .HasColumnType("integer");

                    b.Property<Guid>("To")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("From")
                        .IsUnique();

                    b.HasIndex("To")
                        .IsUnique();

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

            modelBuilder.Entity("GeoRitmMover.Mover.Data.AssetMap", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<int>("From")
                        .HasColumnType("integer");

                    b.Property<Guid>("To")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("From")
                        .IsUnique();

                    b.HasIndex("To")
                        .IsUnique();

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

            modelBuilder.Entity("GeoRitmMover.Mover.Data.EventCodeMap", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<int>("From")
                        .HasColumnType("integer");

                    b.Property<Guid>("To")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("From")
                        .IsUnique();

                    b.HasIndex("To")
                        .IsUnique();

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

            modelBuilder.Entity("GeoRitmMover.Mover.Data.PhotoMap", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<int>("From")
                        .HasColumnType("integer");

                    b.Property<Guid>("To")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("From")
                        .IsUnique();

                    b.HasIndex("To")
                        .IsUnique();

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

            modelBuilder.Entity("GeoRitmMover.Mover.Data.UserMap", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<int>("From")
                        .HasColumnType("integer");

                    b.Property<Guid>("To")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("From")
                        .IsUnique();

                    b.HasIndex("To")
                        .IsUnique();

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

            modelBuilder.Entity("GeoRitmMover.Mover.Data.ZoneMap", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<int>("From")
                        .HasColumnType("integer");

                    b.Property<Guid>("To")
                        .HasColumnType("uuid");

                    b.HasKey("Id");

                    b.HasIndex("From")
                        .IsUnique();

                    b.HasIndex("To")
                        .IsUnique();

                    b.ToTable("Zones");
                });
#pragma warning restore 612, 618
        }
    }
}
