2023-02-27 21:51:16 +04:00
|
|
|
|
// <auto-generated />
|
|
|
|
|
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
|
2023-03-10 15:31:58 +04:00
|
|
|
|
.HasAnnotation("DishVersion", "7.0.3")
|
2023-02-27 21:51:16 +04:00
|
|
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
|
|
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.Component", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ComponentName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Cost")
|
|
|
|
|
.HasColumnType("float");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2023-03-28 16:41:11 +04:00
|
|
|
|
b.ToTable("Components", (string)null);
|
2023-02-27 21:51:16 +04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.Dish", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("DishName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Price")
|
|
|
|
|
.HasColumnType("float");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2023-03-28 16:41:11 +04:00
|
|
|
|
b.ToTable("Dishes", (string)null);
|
2023-02-27 21:51:16 +04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.DishComponent", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<int>("ComponentId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("DishId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("ComponentId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("DishId");
|
|
|
|
|
|
2023-03-28 16:41:11 +04:00
|
|
|
|
b.ToTable("DishComponents", (string)null);
|
2023-02-27 21:51:16 +04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.Order", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("DateCreate")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime?>("DateImplement")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("DishId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Status")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Sum")
|
|
|
|
|
.HasColumnType("float");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("DishId");
|
|
|
|
|
|
2023-03-28 16:41:11 +04:00
|
|
|
|
b.ToTable("Orders", (string)null);
|
2023-02-27 21:51:16 +04:00
|
|
|
|
});
|
|
|
|
|
|
2023-03-24 00:40:30 +04:00
|
|
|
|
modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.Shop", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Address")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Capacity")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("DateOfOpening")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ShopName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Shops");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.ShopDish", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("DishId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("ShopId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("DishId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("ShopId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("ShopDishes");
|
|
|
|
|
});
|
|
|
|
|
|
2023-02-27 21:51:16 +04:00
|
|
|
|
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")
|
2023-03-31 15:16:35 +04:00
|
|
|
|
.WithMany("Orders")
|
2023-02-27 21:51:16 +04:00
|
|
|
|
.HasForeignKey("DishId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Dish");
|
|
|
|
|
});
|
|
|
|
|
|
2023-03-24 00:40:30 +04:00
|
|
|
|
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");
|
|
|
|
|
});
|
|
|
|
|
|
2023-02-27 21:51:16 +04:00
|
|
|
|
modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.Component", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("DishComponents");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.Dish", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Components");
|
2023-03-31 15:16:35 +04:00
|
|
|
|
|
|
|
|
|
b.Navigation("Orders");
|
2023-02-27 21:51:16 +04:00
|
|
|
|
});
|
2023-03-24 00:40:30 +04:00
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("FoodOrdersDatabaseImplement.Models.Shop", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Dishes");
|
|
|
|
|
});
|
2023-02-27 21:51:16 +04:00
|
|
|
|
#pragma warning restore 612, 618
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|