// using System; using FoodOrdersDatabaseImplement; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace FoodOrdersDatabaseImplement.Migrations { [DbContext(typeof(FoodOrdersDatabase))] partial class FoodOrdersDatabaseModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("DishVersion", "7.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("FoodOrdersDatabaseImplement.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", (string)null); }); modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.Dish", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("DishName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Price") .HasColumnType("float"); b.HasKey("Id"); b.ToTable("Dishes", (string)null); }); modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.DishComponent", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ComponentId") .HasColumnType("int"); b.Property("Count") .HasColumnType("int"); b.Property("DishId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("ComponentId"); b.HasIndex("DishId"); b.ToTable("DishComponents", (string)null); }); modelBuilder.Entity("FoodOrdersDatabaseImplement.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("DishId") .HasColumnType("int"); b.Property("Status") .HasColumnType("int"); b.Property("Sum") .HasColumnType("float"); b.HasKey("Id"); b.HasIndex("DishId"); b.ToTable("Orders", (string)null); }); modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.Shop", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Address") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Capacity") .HasColumnType("int"); b.Property("DateOfOpening") .HasColumnType("datetime2"); b.Property("ShopName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Shops"); }); modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.ShopDish", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Count") .HasColumnType("int"); b.Property("DishId") .HasColumnType("int"); b.Property("ShopId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("DishId"); b.HasIndex("ShopId"); b.ToTable("ShopDishes"); }); modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.DishComponent", b => { b.HasOne("FoodOrdersDatabaseImplement.Models.Component", "Component") .WithMany("DishComponents") .HasForeignKey("ComponentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("FoodOrdersDatabaseImplement.Models.Dish", "Dish") .WithMany("Components") .HasForeignKey("DishId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Component"); b.Navigation("Dish"); }); modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.Order", b => { b.HasOne("FoodOrdersDatabaseImplement.Models.Dish", "Dish") .WithMany("Orders") .HasForeignKey("DishId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Dish"); }); modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.ShopDish", b => { b.HasOne("FoodOrdersDatabaseImplement.Models.Dish", "Dish") .WithMany() .HasForeignKey("DishId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("FoodOrdersDatabaseImplement.Models.Shop", "Shop") .WithMany("Dishes") .HasForeignKey("ShopId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Dish"); b.Navigation("Shop"); }); modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.Component", b => { b.Navigation("DishComponents"); }); modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.Dish", b => { b.Navigation("Components"); b.Navigation("Orders"); }); modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.Shop", b => { b.Navigation("Dishes"); }); #pragma warning restore 612, 618 } } }