// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using PizzeriaDatabaseImplement; #nullable disable namespace PizzeriaDatabaseImplement.Migrations { [DbContext(typeof(PizzeriaDatabase))] partial class PizzeriaDatabaseModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("PizzeriaDatabaseImplement.models.Component", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("ComponentName") .IsRequired() .HasColumnType("text"); b.Property("Cost") .HasColumnType("double precision"); b.HasKey("Id"); b.ToTable("Components"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.models.Order", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Count") .HasColumnType("integer"); b.Property("DateCreate") .HasColumnType("timestamp with time zone"); b.Property("DateImplement") .HasColumnType("timestamp with time zone"); b.Property("PizzaId") .HasColumnType("integer"); b.Property("Status") .HasColumnType("integer"); b.Property("Sum") .HasColumnType("double precision"); b.HasKey("Id"); b.HasIndex("PizzaId"); b.ToTable("Orders"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.models.Pizza", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("PizzaName") .IsRequired() .HasColumnType("text"); b.Property("Price") .HasColumnType("double precision"); b.HasKey("Id"); b.ToTable("Pizzas"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.models.PizzaComponent", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("ComponentId") .HasColumnType("integer"); b.Property("Count") .HasColumnType("integer"); b.Property("PizzaId") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("ComponentId"); b.HasIndex("PizzaId"); b.ToTable("PizzaComponents"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.models.Shop", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Addres") .IsRequired() .HasColumnType("text"); b.Property("Capacity") .HasColumnType("integer"); b.Property("OpenTime") .HasColumnType("timestamp with time zone"); b.Property("ShopName") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Shops"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.models.ShopPizza", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Count") .HasColumnType("integer"); b.Property("PizzaId") .HasColumnType("integer"); b.Property("ShopId") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("PizzaId"); b.HasIndex("ShopId"); b.ToTable("ShopPizzas"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.models.Order", b => { b.HasOne("PizzeriaDatabaseImplement.models.Pizza", "Pizza") .WithMany("Orders") .HasForeignKey("PizzaId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Pizza"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.models.PizzaComponent", b => { b.HasOne("PizzeriaDatabaseImplement.models.Component", "Component") .WithMany("PizzaComponents") .HasForeignKey("ComponentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("PizzeriaDatabaseImplement.models.Pizza", "Pizza") .WithMany("Components") .HasForeignKey("PizzaId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Component"); b.Navigation("Pizza"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.models.ShopPizza", b => { b.HasOne("PizzeriaDatabaseImplement.models.Pizza", "Pizza") .WithMany() .HasForeignKey("PizzaId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("PizzeriaDatabaseImplement.models.Shop", "Shop") .WithMany("Pizzas") .HasForeignKey("ShopId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Pizza"); b.Navigation("Shop"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.models.Component", b => { b.Navigation("PizzaComponents"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.models.Pizza", b => { b.Navigation("Components"); b.Navigation("Orders"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.models.Shop", b => { b.Navigation("Pizzas"); }); #pragma warning restore 612, 618 } } }