2023-03-13 22:55:48 +04:00
|
|
|
|
// <auto-generated />
|
|
|
|
|
using System;
|
|
|
|
|
using ConfectioneryDatabaseImplement;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
|
|
|
|
|
|
#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", 63);
|
|
|
|
|
|
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
|
|
2023-04-11 00:52:16 +04:00
|
|
|
|
modelBuilder.Entity("ConfectioneryDatabaseImplement.Models.Client", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ClientFIO")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Email")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Password")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Clients");
|
|
|
|
|
});
|
|
|
|
|
|
2023-03-13 22:55:48 +04:00
|
|
|
|
modelBuilder.Entity("ConfectioneryDatabaseImplement.Models.Component", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ComponentName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Cost")
|
|
|
|
|
.HasColumnType("double precision");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Components");
|
|
|
|
|
});
|
|
|
|
|
|
2023-05-03 23:15:51 +04:00
|
|
|
|
modelBuilder.Entity("ConfectioneryDatabaseImplement.Models.Implementer", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ImplementerFIO")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Password")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Qualification")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("WorkExperience")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Implementers");
|
|
|
|
|
});
|
|
|
|
|
|
2023-03-13 22:55:48 +04:00
|
|
|
|
modelBuilder.Entity("ConfectioneryDatabaseImplement.Models.Order", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
|
|
2023-04-25 00:01:49 +04:00
|
|
|
|
b.Property<int>("ClientId")
|
2023-04-11 00:52:16 +04:00
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
2023-03-13 22:55:48 +04:00
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("DateCreate")
|
|
|
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime?>("DateImplement")
|
|
|
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
|
|
2023-05-03 23:15:51 +04:00
|
|
|
|
b.Property<int?>("ImplementerId")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
2023-03-13 22:55:48 +04:00
|
|
|
|
b.Property<int>("PastryId")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Status")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Sum")
|
|
|
|
|
.HasColumnType("double precision");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2023-04-11 00:52:16 +04:00
|
|
|
|
b.HasIndex("ClientId");
|
|
|
|
|
|
2023-05-03 23:15:51 +04:00
|
|
|
|
b.HasIndex("ImplementerId");
|
|
|
|
|
|
2023-04-11 00:52:16 +04:00
|
|
|
|
b.HasIndex("PastryId");
|
|
|
|
|
|
2023-03-13 22:55:48 +04:00
|
|
|
|
b.ToTable("Orders");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("ConfectioneryDatabaseImplement.Models.Pastry", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("PastryName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Price")
|
|
|
|
|
.HasColumnType("double precision");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Pastries");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("ConfectioneryDatabaseImplement.Models.PastryComponent", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<int>("ComponentId")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("PastryId")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("ComponentId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("PastryId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("PastryComponents");
|
|
|
|
|
});
|
|
|
|
|
|
2023-04-11 00:52:16 +04:00
|
|
|
|
modelBuilder.Entity("ConfectioneryDatabaseImplement.Models.Order", b =>
|
|
|
|
|
{
|
2023-04-25 00:01:49 +04:00
|
|
|
|
b.HasOne("ConfectioneryDatabaseImplement.Models.Client", "Client")
|
2023-04-11 00:52:16 +04:00
|
|
|
|
.WithMany("Orders")
|
2023-04-25 00:01:49 +04:00
|
|
|
|
.HasForeignKey("ClientId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
2023-04-11 00:52:16 +04:00
|
|
|
|
|
2023-05-03 23:15:51 +04:00
|
|
|
|
b.HasOne("ConfectioneryDatabaseImplement.Models.Implementer", "Implementer")
|
|
|
|
|
.WithMany("Orders")
|
|
|
|
|
.HasForeignKey("ImplementerId");
|
|
|
|
|
|
2023-04-11 00:52:16 +04:00
|
|
|
|
b.HasOne("ConfectioneryDatabaseImplement.Models.Pastry", "Pastry")
|
2023-04-25 00:01:49 +04:00
|
|
|
|
.WithMany("Orders")
|
2023-04-11 00:52:16 +04:00
|
|
|
|
.HasForeignKey("PastryId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
2023-04-25 00:01:49 +04:00
|
|
|
|
b.Navigation("Client");
|
|
|
|
|
|
2023-05-03 23:15:51 +04:00
|
|
|
|
b.Navigation("Implementer");
|
|
|
|
|
|
2023-04-11 00:52:16 +04:00
|
|
|
|
b.Navigation("Pastry");
|
|
|
|
|
});
|
|
|
|
|
|
2023-03-13 22:55:48 +04:00
|
|
|
|
modelBuilder.Entity("ConfectioneryDatabaseImplement.Models.PastryComponent", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("ConfectioneryDatabaseImplement.Models.Component", "Component")
|
|
|
|
|
.WithMany("PastryComponents")
|
|
|
|
|
.HasForeignKey("ComponentId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("ConfectioneryDatabaseImplement.Models.Pastry", "Pastry")
|
|
|
|
|
.WithMany("Components")
|
|
|
|
|
.HasForeignKey("PastryId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Component");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Pastry");
|
|
|
|
|
});
|
|
|
|
|
|
2023-04-11 00:52:16 +04:00
|
|
|
|
modelBuilder.Entity("ConfectioneryDatabaseImplement.Models.Client", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Orders");
|
|
|
|
|
});
|
|
|
|
|
|
2023-03-13 22:55:48 +04:00
|
|
|
|
modelBuilder.Entity("ConfectioneryDatabaseImplement.Models.Component", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("PastryComponents");
|
|
|
|
|
});
|
|
|
|
|
|
2023-05-03 23:15:51 +04:00
|
|
|
|
modelBuilder.Entity("ConfectioneryDatabaseImplement.Models.Implementer", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Orders");
|
|
|
|
|
});
|
|
|
|
|
|
2023-03-13 22:55:48 +04:00
|
|
|
|
modelBuilder.Entity("ConfectioneryDatabaseImplement.Models.Pastry", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Components");
|
2023-04-25 00:01:49 +04:00
|
|
|
|
|
|
|
|
|
b.Navigation("Orders");
|
2023-03-13 22:55:48 +04:00
|
|
|
|
});
|
|
|
|
|
#pragma warning restore 612, 618
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|