// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 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", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("PizzeriaDatabaseImplement.Models.Component", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ComponentName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Cost") .HasColumnType("float"); b.HasKey("Id"); b.ToTable("Components"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.Models.Order", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Count") .HasColumnType("int"); b.Property("DateCreate") .HasColumnType("datetime2"); b.Property("DateImplement") .HasColumnType("datetime2"); b.Property("PizzaId") .HasColumnType("int"); b.Property("Status") .HasColumnType("int"); b.Property("Sum") .HasColumnType("float"); b.HasKey("Id"); b.HasIndex("PizzaId"); b.ToTable("Orders"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.Models.Pizza", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("PizzaName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Price") .HasColumnType("float"); b.HasKey("Id"); b.ToTable("Pizzas"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.Models.PizzaComponent", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ComponentId") .HasColumnType("int"); b.Property("Count") .HasColumnType("int"); b.Property("PizzaId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("ComponentId"); b.HasIndex("PizzaId"); b.ToTable("PizzaComponents"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.Models.Shop", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Adress") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("OpeningDate") .HasColumnType("datetime2"); b.Property("PizzaMaxCount") .HasColumnType("int"); b.Property("ShopName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Shops"); }); modelBuilder.Entity("PizzeriaDatabaseImplement.Models.ShopPizzas", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Count") .HasColumnType("int"); b.Property("PizzaId") .HasColumnType("int"); b.Property("ShopId") .HasColumnType("int"); 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.ShopPizzas", b => { b.HasOne("PizzeriaDatabaseImplement.Models.Pizza", "Pizza") .WithMany("ShopPizzas") .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 } } }