// 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))] [Migration("20240505193918_lab6")] partial class lab6 { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Client", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("ClientFIO") .IsRequired() .HasColumnType("text"); b.Property("Email") .IsRequired() .HasColumnType("text"); b.Property("Password") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Clients"); }); modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Furniture", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("FurnitureName") .IsRequired() .HasColumnType("text"); b.Property("Price") .HasColumnType("double precision"); b.HasKey("Id"); b.ToTable("Furnitures"); }); modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.FurnitureWorkpiece", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Count") .HasColumnType("integer"); b.Property("FurnitureId") .HasColumnType("integer"); b.Property("WorkpieceId") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("FurnitureId"); b.HasIndex("WorkpieceId"); b.ToTable("FurnitureWorkpieces"); }); modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Implementer", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("ImplementerFIO") .IsRequired() .HasColumnType("text"); b.Property("Password") .IsRequired() .HasColumnType("text"); b.Property("Qualification") .HasColumnType("integer"); b.Property("WorkExperience") .HasColumnType("integer"); b.HasKey("Id"); b.ToTable("Implementers"); }); modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Order", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("ClientId") .HasColumnType("integer"); b.Property("Count") .HasColumnType("integer"); b.Property("DateCreate") .HasColumnType("timestamp with time zone"); b.Property("DateImplement") .HasColumnType("timestamp with time zone"); b.Property("FurnitureId") .HasColumnType("integer"); b.Property("ImplementerId") .HasColumnType("integer"); b.Property("Status") .HasColumnType("integer"); b.Property("Sum") .HasColumnType("double precision"); b.HasKey("Id"); b.HasIndex("ClientId"); b.HasIndex("FurnitureId"); b.HasIndex("ImplementerId"); b.ToTable("Orders"); }); modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Workpiece", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Cost") .HasColumnType("double precision"); b.Property("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 => { b.HasOne("FurnitureAssemblyDatabaseImplement.Models.Client", "Client") .WithMany() .HasForeignKey("ClientId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("FurnitureAssemblyDatabaseImplement.Models.Furniture", "Furniture") .WithMany("Orders") .HasForeignKey("FurnitureId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("FurnitureAssemblyDatabaseImplement.Models.Implementer", "Implementer") .WithMany("Orders") .HasForeignKey("ImplementerId"); b.Navigation("Client"); b.Navigation("Furniture"); b.Navigation("Implementer"); }); modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Furniture", b => { b.Navigation("Orders"); b.Navigation("Workpieces"); }); modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Implementer", b => { b.Navigation("Orders"); }); modelBuilder.Entity("FurnitureAssemblyDatabaseImplement.Models.Workpiece", b => { b.Navigation("FurnitureWorkpieces"); }); #pragma warning restore 612, 618 } } }