// <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 QuartzClustering.Data;

#nullable disable

namespace QuartzClustering.Migrations
{
    [DbContext(typeof(AppDbContext))]
    [Migration("20221118224244_CreateSchema")]
    partial class CreateSchema
    {
        /// <inheritdoc />
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "7.0.0")
                .HasAnnotation("Relational:MaxIdentifierLength", 128);

            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);

            modelBuilder.Entity("QuartzClustering.ExchangeRateValues", b =>
                {
                    b.Property<int>("ExchangeRateValuesId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ExchangeRateValuesId"));

                    b.Property<int?>("ExchangeRatesId")
                        .HasColumnType("int");

                    b.Property<string>("Rate")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)");

                    b.Property<decimal>("Value")
                        .HasPrecision(20, 12)
                        .HasColumnType("decimal(20,12)");

                    b.HasKey("ExchangeRateValuesId");

                    b.HasIndex("ExchangeRatesId");

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

            modelBuilder.Entity("QuartzClustering.ExchangeRates", b =>
                {
                    b.Property<int>("ExchangeRatesId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ExchangeRatesId"));

                    b.Property<string>("Base")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("Date")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)");

                    b.HasKey("ExchangeRatesId");

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

            modelBuilder.Entity("QuartzClustering.ExchangeRateValues", b =>
                {
                    b.HasOne("QuartzClustering.ExchangeRates", null)
                        .WithMany("Rates")
                        .HasForeignKey("ExchangeRatesId");
                });

            modelBuilder.Entity("QuartzClustering.ExchangeRates", b =>
                {
                    b.Navigation("Rates");
                });
#pragma warning restore 612, 618
        }
    }
}
