// <auto-generated />
using System;
using DSaC_second.Database;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

#nullable disable

namespace DSaC_second.Migrations
{
    [DbContext(typeof(DsacContext))]
    [Migration("20240914152154_initial")]
    partial class initial
    {
        /// <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("DSaC_second.Database.Models.Contract", b =>
                {
                    b.Property<Guid>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("uuid")
                        .HasColumnName("id");

                    b.Property<string>("ContractNumber")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("contract_number");

                    b.Property<Guid>("CounterpartyId")
                        .HasColumnType("uuid")
                        .HasColumnName("counterparty_id");

                    b.Property<DateTime>("CreatinTime")
                        .HasColumnType("timestamp with time zone")
                        .HasColumnName("creation_time");

                    b.Property<bool>("IsClosed")
                        .HasColumnType("boolean")
                        .HasColumnName("is_closed");

                    b.Property<string>("ManagerName")
                        .IsRequired()
                        .HasColumnType("text")
                        .HasColumnName("manager_name");

                    b.HasKey("Id");

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