// <auto-generated />
using System;
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("20240923122908_Initialize")]
    partial class Initialize
    {
        /// <inheritdoc />
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "8.0.8")
                .HasAnnotation("Relational:MaxIdentifierLength", 63);

            NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);

            modelBuilder.Entity("GeoRitmMover.GeoRitm.Data.AssetGroup", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("integer")
                        .HasColumnName("id");

                    NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("name");

                    b.HasKey("Id");

                    b.ToTable("object_groups", (string)null);
                });

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

                    b.Property<long>("From")
                        .HasColumnType("bigint");

                    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<long>("From")
                        .HasColumnType("bigint");

                    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.Counter", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasMaxLength(32)
                        .HasColumnType("character varying(32)");

                    b.HasKey("Id");

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

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