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

namespace FakturyWeb.Migrations
{
    [DbContext(typeof(FakturyWebContext))]
    partial class FakturyWebContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("Relational:MaxIdentifierLength", 128)
                .HasAnnotation("ProductVersion", "5.0.17")
                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

            modelBuilder.Entity("RazorPagesMovie.Models.FAKTURA", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

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

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

                    b.Property<int>("CISLO_ABS")
                        .HasColumnType("int");

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

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

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

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

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

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

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

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

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

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

                    b.Property<byte>("FORMA_UHRADY")
                        .HasColumnType("tinyint");

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

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

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

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

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

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

                    b.Property<DateTime>("SPLATNOST")
                        .HasColumnType("datetime2");

                    b.Property<DateTime>("VYSTAVENI")
                        .HasColumnType("datetime2");

                    b.Property<int>("ZakaznikID")
                        .HasColumnType("int");

                    b.HasKey("ID");

                    b.HasIndex("ZakaznikID");

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

            modelBuilder.Entity("RazorPagesMovie.Models.PLATBA", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

                    b.Property<decimal>("CASTKA")
                        .HasColumnType("money");

                    b.Property<DateTime>("DATUM")
                        .HasColumnType("datetime2");

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

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

                    b.HasKey("ID");

                    b.HasIndex("FAKTURAID");

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

            modelBuilder.Entity("RazorPagesMovie.Models.POLOZKA", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

                    b.Property<decimal>("CENA")
                        .HasColumnType("money");

                    b.Property<decimal>("CENA_JEDNOTKA")
                        .HasColumnType("money");

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

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

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

                    b.Property<float>("POCET")
                        .HasColumnType("real");

                    b.Property<float>("SLEVA")
                        .HasColumnType("real");

                    b.HasKey("ID");

                    b.HasIndex("FAKTURAID");

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

            modelBuilder.Entity("RazorPagesMovie.Models.UZIVATEL", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

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

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

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

                    b.Property<int>("FAKTURA_CISLOVANI")
                        .HasColumnType("int");

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

                    b.Property<int>("FAKTURA_SPLATNOST")
                        .HasColumnType("int");

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

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

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

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

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

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

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

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

                    b.HasKey("ID");

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

            modelBuilder.Entity("RazorPagesMovie.Models.ZAKAZNIK", b =>
                {
                    b.Property<int>("ID")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

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

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

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

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

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

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

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

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

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

                    b.HasKey("ID");

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

            modelBuilder.Entity("RazorPagesMovie.Models.FAKTURA", b =>
                {
                    b.HasOne("RazorPagesMovie.Models.ZAKAZNIK", "ZAKAZNIK")
                        .WithMany("Faktury")
                        .HasForeignKey("ZakaznikID")
                        .OnDelete(DeleteBehavior.Restrict)
                        .IsRequired();

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

            modelBuilder.Entity("RazorPagesMovie.Models.PLATBA", b =>
                {
                    b.HasOne("RazorPagesMovie.Models.FAKTURA", null)
                        .WithMany("PLATBY")
                        .HasForeignKey("FAKTURAID");
                });

            modelBuilder.Entity("RazorPagesMovie.Models.POLOZKA", b =>
                {
                    b.HasOne("RazorPagesMovie.Models.FAKTURA", null)
                        .WithMany("POLOZKY")
                        .HasForeignKey("FAKTURAID");
                });

            modelBuilder.Entity("RazorPagesMovie.Models.FAKTURA", b =>
                {
                    b.Navigation("PLATBY");

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

            modelBuilder.Entity("RazorPagesMovie.Models.ZAKAZNIK", b =>
                {
                    b.Navigation("Faktury");
                });
#pragma warning restore 612, 618
        }
    }
}
