2023-03-06 10:20:01 +04:00
|
|
|
|
// <auto-generated />
|
|
|
|
|
using System;
|
|
|
|
|
using ConfectioneryDataBaseImplement;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
namespace ConfectioneryDataBaseImplement.Migrations
|
|
|
|
|
{
|
|
|
|
|
[DbContext(typeof(ConfectioneryDatabase))]
|
|
|
|
|
partial class ConfectioneryDatabaseModelSnapshot : 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);
|
|
|
|
|
|
2023-04-03 10:49:52 +04:00
|
|
|
|
modelBuilder.Entity("ConfectioneryDataBaseImplement.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");
|
|
|
|
|
});
|
|
|
|
|
|
2023-03-06 10:20:01 +04:00
|
|
|
|
modelBuilder.Entity("ConfectioneryDataBaseImplement.Models.Ingredient", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Cost")
|
|
|
|
|
.HasColumnType("float");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("IngredientName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Ingredients");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("ConfectioneryDataBaseImplement.Models.Order", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
2023-04-03 10:49:52 +04:00
|
|
|
|
b.Property<int>("ClientId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
2023-03-06 10:20:01 +04:00
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("DateCreate")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime?>("DateImplement")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("PastryId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Status")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Sum")
|
|
|
|
|
.HasColumnType("float");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2023-04-03 10:49:52 +04:00
|
|
|
|
b.HasIndex("ClientId");
|
|
|
|
|
|
2023-03-06 10:20:01 +04:00
|
|
|
|
b.HasIndex("PastryId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Orders");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("ConfectioneryDataBaseImplement.Models.Pastry", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("PastryName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Price")
|
|
|
|
|
.HasColumnType("float");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Pastrys");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("ConfectioneryDataBaseImplement.Models.PastryIngredient", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("IngredientId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("PastryId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("IngredientId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("PastryId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("PastryIngredients");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("ConfectioneryDataBaseImplement.Models.Order", b =>
|
|
|
|
|
{
|
2023-04-03 10:49:52 +04:00
|
|
|
|
b.HasOne("ConfectioneryDataBaseImplement.Models.Client", "Client")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("ClientId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
2023-03-06 10:20:01 +04:00
|
|
|
|
b.HasOne("ConfectioneryDataBaseImplement.Models.Pastry", null)
|
|
|
|
|
.WithMany("Orders")
|
|
|
|
|
.HasForeignKey("PastryId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
2023-04-03 10:49:52 +04:00
|
|
|
|
|
|
|
|
|
b.Navigation("Client");
|
2023-03-06 10:20:01 +04:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("ConfectioneryDataBaseImplement.Models.PastryIngredient", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("ConfectioneryDataBaseImplement.Models.Ingredient", "Ingredient")
|
|
|
|
|
.WithMany("PastryIgredients")
|
|
|
|
|
.HasForeignKey("IngredientId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("ConfectioneryDataBaseImplement.Models.Pastry", "Pastry")
|
|
|
|
|
.WithMany("Ingredients")
|
|
|
|
|
.HasForeignKey("PastryId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Ingredient");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Pastry");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("ConfectioneryDataBaseImplement.Models.Ingredient", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("PastryIgredients");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("ConfectioneryDataBaseImplement.Models.Pastry", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Ingredients");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Orders");
|
|
|
|
|
});
|
|
|
|
|
#pragma warning restore 612, 618
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|