256 lines
8.5 KiB
C#
256 lines
8.5 KiB
C#
|
// <auto-generated />
|
|||
|
using System;
|
|||
|
using CanteenDatabaseImplement;
|
|||
|
using Microsoft.EntityFrameworkCore;
|
|||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace CanteenDatabaseImplement.Migrations
|
|||
|
{
|
|||
|
[DbContext(typeof(CanteenDatabase))]
|
|||
|
partial class CanteenDatabaseModelSnapshot : ModelSnapshot
|
|||
|
{
|
|||
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|||
|
{
|
|||
|
#pragma warning disable 612, 618
|
|||
|
modelBuilder
|
|||
|
.HasAnnotation("ProductVersion", "7.0.18")
|
|||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|||
|
|
|||
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|||
|
|
|||
|
modelBuilder.Entity("CanteenDatabaseImplement.Models.Client", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<string>("ClientFIO")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("Email")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("Password")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Clients");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("CanteenDatabaseImplement.Models.Cook", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<string>("CookFIO")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("Email")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.Property<string>("Password")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Cooks");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("CanteenDatabaseImplement.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>("DishPrice")
|
|||
|
.HasColumnType("float");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Dishes");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("CanteenDatabaseImplement.Models.DishIngredient", 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>("IngredientId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.HasIndex("DishId");
|
|||
|
|
|||
|
b.HasIndex("IngredientId");
|
|||
|
|
|||
|
b.ToTable("DishIngredients");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("CanteenDatabaseImplement.Models.Ingredient", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<double>("IngredientCost")
|
|||
|
.HasColumnType("float");
|
|||
|
|
|||
|
b.Property<string>("IngredientName")
|
|||
|
.IsRequired()
|
|||
|
.HasColumnType("nvarchar(max)");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.ToTable("Ingredients");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("CanteenDatabaseImplement.Models.Order", b =>
|
|||
|
{
|
|||
|
b.Property<int>("Id")
|
|||
|
.ValueGeneratedOnAdd()
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|||
|
|
|||
|
b.Property<int>("ClientId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int?>("CookId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<DateTime>("DateCreate")
|
|||
|
.HasColumnType("datetime2");
|
|||
|
|
|||
|
b.Property<DateTime?>("DateImplement")
|
|||
|
.HasColumnType("datetime2");
|
|||
|
|
|||
|
b.Property<int>("DishCount")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("DishId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<double>("OrderPrice")
|
|||
|
.HasColumnType("float");
|
|||
|
|
|||
|
b.Property<int>("OrderStatus")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("PaymentStatus")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.HasIndex("ClientId");
|
|||
|
|
|||
|
b.HasIndex("CookId");
|
|||
|
|
|||
|
b.HasIndex("DishId");
|
|||
|
|
|||
|
b.ToTable("Orders");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("CanteenDatabaseImplement.Models.DishIngredient", b =>
|
|||
|
{
|
|||
|
b.HasOne("CanteenDatabaseImplement.Models.Dish", "Dish")
|
|||
|
.WithMany("Ingredients")
|
|||
|
.HasForeignKey("DishId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.HasOne("CanteenDatabaseImplement.Models.Ingredient", "Ingredient")
|
|||
|
.WithMany("DishIngredients")
|
|||
|
.HasForeignKey("IngredientId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.Navigation("Dish");
|
|||
|
|
|||
|
b.Navigation("Ingredient");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("CanteenDatabaseImplement.Models.Order", b =>
|
|||
|
{
|
|||
|
b.HasOne("CanteenDatabaseImplement.Models.Client", "Client")
|
|||
|
.WithMany("Orders")
|
|||
|
.HasForeignKey("ClientId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.HasOne("CanteenDatabaseImplement.Models.Cook", "Cook")
|
|||
|
.WithMany("Orders")
|
|||
|
.HasForeignKey("CookId");
|
|||
|
|
|||
|
b.HasOne("CanteenDatabaseImplement.Models.Dish", "Dish")
|
|||
|
.WithMany("Orders")
|
|||
|
.HasForeignKey("DishId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.Navigation("Client");
|
|||
|
|
|||
|
b.Navigation("Cook");
|
|||
|
|
|||
|
b.Navigation("Dish");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("CanteenDatabaseImplement.Models.Client", b =>
|
|||
|
{
|
|||
|
b.Navigation("Orders");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("CanteenDatabaseImplement.Models.Cook", b =>
|
|||
|
{
|
|||
|
b.Navigation("Orders");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("CanteenDatabaseImplement.Models.Dish", b =>
|
|||
|
{
|
|||
|
b.Navigation("Ingredients");
|
|||
|
|
|||
|
b.Navigation("Orders");
|
|||
|
});
|
|||
|
|
|||
|
modelBuilder.Entity("CanteenDatabaseImplement.Models.Ingredient", b =>
|
|||
|
{
|
|||
|
b.Navigation("DishIngredients");
|
|||
|
});
|
|||
|
#pragma warning restore 612, 618
|
|||
|
}
|
|||
|
}
|
|||
|
}
|