251 lines
8.5 KiB
C#
251 lines
8.5 KiB
C#
|
// <auto-generated />
|
|||
|
using System;
|
|||
|
using ConfectioneryDataBaseImplement;
|
|||
|
using Microsoft.EntityFrameworkCore;
|
|||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace ConfectioneryDataBaseImplement.Migrations
|
|||
|
{
|
|||
|
[DbContext(typeof(ConfectioneryDatabase))]
|
|||
|
[Migration("20230427171040_AddImplementer")]
|
|||
|
partial class AddImplementer
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|||
|
{
|
|||
|
#pragma warning disable 612, 618
|
|||
|
modelBuilder
|
|||
|
.HasAnnotation("ProductVersion", "7.0.3")
|
|||
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|||
|
|
|||
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|||
|
|
|||
|
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");
|
|||
|
});
|
|||
|
|
|||
|
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");
|
|||
|
});
|
|||
|
|
|||
|
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"));
|
|||
|
|
|||
|
b.Property<int>("ClientId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("Count")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<DateTime>("DateCreate")
|
|||
|
.HasColumnType("datetime2");
|
|||
|
|
|||
|
b.Property<DateTime?>("DateImplement")
|
|||
|
.HasColumnType("datetime2");
|
|||
|
|
|||
|
b.Property<int?>("ImplementerId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("PastryId")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<int>("Status")
|
|||
|
.HasColumnType("int");
|
|||
|
|
|||
|
b.Property<double>("Sum")
|
|||
|
.HasColumnType("float");
|
|||
|
|
|||
|
b.HasKey("Id");
|
|||
|
|
|||
|
b.HasIndex("ClientId");
|
|||
|
|
|||
|
b.HasIndex("ImplementerId");
|
|||
|
|
|||
|
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 =>
|
|||
|
{
|
|||
|
b.HasOne("ConfectioneryDataBaseImplement.Models.Client", "Client")
|
|||
|
.WithMany()
|
|||
|
.HasForeignKey("ClientId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.HasOne("ConfectioneryDataBaseImplement.Models.Implementer", "Implementer")
|
|||
|
.WithMany("Orders")
|
|||
|
.HasForeignKey("ImplementerId");
|
|||
|
|
|||
|
b.HasOne("ConfectioneryDataBaseImplement.Models.Pastry", null)
|
|||
|
.WithMany("Orders")
|
|||
|
.HasForeignKey("PastryId")
|
|||
|
.OnDelete(DeleteBehavior.Cascade)
|
|||
|
.IsRequired();
|
|||
|
|
|||
|
b.Navigation("Client");
|
|||
|
|
|||
|
b.Navigation("Implementer");
|
|||
|
});
|
|||
|
|
|||
|
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.Implementer", b =>
|
|||
|
{
|
|||
|
b.Navigation("Orders");
|
|||
|
});
|
|||
|
|
|||
|
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
|
|||
|
}
|
|||
|
}
|
|||
|
}
|