2024-05-04 20:14:41 +04:00
|
|
|
|
// <auto-generated />
|
|
|
|
|
using System;
|
|
|
|
|
using FurnitureAssemblyDatabaseImplement;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
namespace FurnitureAssemblyDatabaseImplement.Migrations
|
|
|
|
|
{
|
|
|
|
|
[DbContext(typeof(FurnitureAssemblyDatabase))]
|
2024-05-05 20:11:20 +04:00
|
|
|
|
[Migration("20240505150634_clientUpd")]
|
|
|
|
|
partial class clientUpd
|
2024-05-04 20:14:41 +04:00
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
#pragma warning disable 612, 618
|
|
|
|
|
modelBuilder
|
|
|
|
|
.HasAnnotation("ProductVersion", "7.0.7")
|
|
|
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
|
|
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
|
|
2024-05-05 20:11:20 +04:00
|
|
|
|
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.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");
|
|
|
|
|
});
|
|
|
|
|
|
2024-05-04 20:14:41 +04:00
|
|
|
|
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Furniture", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("FurnitureName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Price")
|
|
|
|
|
.HasColumnType("double precision");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Furnitures");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.FurnitureWorkpiece", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Count")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("FurnitureId")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("WorkpieceId")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("FurnitureId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("WorkpieceId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("FurnitureWorkpieces");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Order", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
|
|
2024-05-05 20:11:20 +04:00
|
|
|
|
b.Property<int>("ClientId")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
2024-05-04 20:14:41 +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");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("FurnitureId")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Status")
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Sum")
|
|
|
|
|
.HasColumnType("double precision");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
2024-05-05 20:11:20 +04:00
|
|
|
|
b.HasIndex("ClientId");
|
|
|
|
|
|
2024-05-04 20:14:41 +04:00
|
|
|
|
b.HasIndex("FurnitureId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Orders");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Workpiece", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("integer");
|
|
|
|
|
|
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<double>("Cost")
|
|
|
|
|
.HasColumnType("double precision");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("WorkpieceName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("text");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Workpieces");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.FurnitureWorkpiece", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.Furniture", "Furniture")
|
|
|
|
|
.WithMany("Workpieces")
|
|
|
|
|
.HasForeignKey("FurnitureId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.Workpiece", "Workpiece")
|
|
|
|
|
.WithMany("FurnitureWorkpieces")
|
|
|
|
|
.HasForeignKey("WorkpieceId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
|
|
|
|
b.Navigation("Furniture");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Workpiece");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Order", b =>
|
|
|
|
|
{
|
2024-05-05 20:11:20 +04:00
|
|
|
|
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.Client", "Client")
|
|
|
|
|
.WithMany()
|
|
|
|
|
.HasForeignKey("ClientId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
2024-05-04 20:14:41 +04:00
|
|
|
|
b.HasOne("FurnitureAssemblyDatabaseImplement.Models.Furniture", "Furniture")
|
|
|
|
|
.WithMany("Orders")
|
|
|
|
|
.HasForeignKey("FurnitureId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
|
2024-05-05 20:11:20 +04:00
|
|
|
|
b.Navigation("Client");
|
|
|
|
|
|
2024-05-04 20:14:41 +04:00
|
|
|
|
b.Navigation("Furniture");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Furniture", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Orders");
|
|
|
|
|
|
|
|
|
|
b.Navigation("Workpieces");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Workpiece", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("FurnitureWorkpieces");
|
|
|
|
|
});
|
|
|
|
|
#pragma warning restore 612, 618
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|