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-04-27 22:54:15 +04:00
|
|
|
|
modelBuilder.Entity("ConfectioneryDataBaseImplement.Models.Implementer", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ImplementerFIO")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Password")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Qualification")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("WorkExperience")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Implementers");
|
|
|
|
|
});
|
|
|
|
|
|
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");
|
|
|
|
|
});
|
|
|
|
|
|
2023-04-28 08:35:50 +04:00
|
|
|
|
modelBuilder.Entity("ConfectioneryDataBaseImplement.Models.MessageInfo", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<string>("MessageId")
|
|
|
|
|
.HasColumnType("nvarchar(450)");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Body")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<int?>("ClientId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("DateDelivery")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("SenderName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Subject")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.HasKey("MessageId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("MessageInfos");
|
|
|
|
|
});
|
|
|
|
|
|
2023-03-06 10:20:01 +04:00
|
|
|
|
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");
|
|
|
|
|
|
2023-04-27 22:54:15 +04:00
|
|
|
|
b.Property<int?>("ImplementerId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
2023-03-06 10:20:01 +04:00
|
|
|
|
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-04-27 22:54:15 +04:00
|
|
|
|
b.HasIndex("ImplementerId");
|
|
|
|
|
|
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-04-27 22:54:15 +04:00
|
|
|
|
b.HasOne("ConfectioneryDataBaseImplement.Models.Implementer", "Implementer")
|
|
|
|
|
.WithMany("Orders")
|
|
|
|
|
.HasForeignKey("ImplementerId");
|
|
|
|
|
|
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-04-27 22:54:15 +04:00
|
|
|
|
|
|
|
|
|
b.Navigation("Implementer");
|
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");
|
|
|
|
|
});
|
|
|
|
|
|
2023-04-27 22:54:15 +04:00
|
|
|
|
modelBuilder.Entity("ConfectioneryDataBaseImplement.Models.Implementer", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Orders");
|
|
|
|
|
});
|
|
|
|
|
|
2023-03-06 10:20:01 +04:00
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|