From 7f5911ffafb1388075263ae35b84e763c50f4ced Mon Sep 17 00:00:00 2001 From: dex_moth Date: Fri, 21 Jun 2024 21:27:01 +0400 Subject: [PATCH] ready --- .../20240513132159_initialcreate.Designer.cs | 255 ------------------ ...20240513152048_add_implementer.Designer.cs | 255 ------------------ .../20240513152048_add_implementer.cs | 22 -- .../20240513170412_create.Designer.cs | 252 ----------------- .../Migrations/20240513170412_create.cs | 59 ---- .../20240514140738_implementer.Designer.cs | 252 ----------------- .../Migrations/20240514140738_implementer.cs | 22 -- .../20240514143630_implementer2.Designer.cs | 252 ----------------- .../Migrations/20240514143630_implementer2.cs | 22 -- .../Migrations/20240514161521_implementer2.cs | 48 ---- ...r.cs => 20240621171359_create.Designer.cs} | 11 +- ...tialcreate.cs => 20240621171359_create.cs} | 36 ++- .../FishFactoryDatabaseModelSnapshot.cs | 7 +- 13 files changed, 46 insertions(+), 1447 deletions(-) delete mode 100644 FishFactoryDatabaseImplement/Migrations/20240513132159_initialcreate.Designer.cs delete mode 100644 FishFactoryDatabaseImplement/Migrations/20240513152048_add_implementer.Designer.cs delete mode 100644 FishFactoryDatabaseImplement/Migrations/20240513152048_add_implementer.cs delete mode 100644 FishFactoryDatabaseImplement/Migrations/20240513170412_create.Designer.cs delete mode 100644 FishFactoryDatabaseImplement/Migrations/20240513170412_create.cs delete mode 100644 FishFactoryDatabaseImplement/Migrations/20240514140738_implementer.Designer.cs delete mode 100644 FishFactoryDatabaseImplement/Migrations/20240514140738_implementer.cs delete mode 100644 FishFactoryDatabaseImplement/Migrations/20240514143630_implementer2.Designer.cs delete mode 100644 FishFactoryDatabaseImplement/Migrations/20240514143630_implementer2.cs delete mode 100644 FishFactoryDatabaseImplement/Migrations/20240514161521_implementer2.cs rename FishFactoryDatabaseImplement/Migrations/{20240514161521_implementer2.Designer.cs => 20240621171359_create.Designer.cs} (97%) rename FishFactoryDatabaseImplement/Migrations/{20240513132159_initialcreate.cs => 20240621171359_create.cs} (84%) diff --git a/FishFactoryDatabaseImplement/Migrations/20240513132159_initialcreate.Designer.cs b/FishFactoryDatabaseImplement/Migrations/20240513132159_initialcreate.Designer.cs deleted file mode 100644 index 28f45e9..0000000 --- a/FishFactoryDatabaseImplement/Migrations/20240513132159_initialcreate.Designer.cs +++ /dev/null @@ -1,255 +0,0 @@ -// -using System; -using FishFactoryDatabaseImplement; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace FishFactoryDatabaseImplement.Migrations -{ - [DbContext(typeof(FishFactoryDatabase))] - [Migration("20240513132159_initialcreate")] - partial class initialcreate - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.16") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Canned", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CannedName") - .IsRequired() - .HasColumnType("text"); - - b.Property("Price") - .HasColumnType("double precision"); - - b.HasKey("Id"); - - b.ToTable("Canneds"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.CannedComponent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CannedId") - .HasColumnType("integer"); - - b.Property("ComponentId") - .HasColumnType("integer"); - - b.Property("Count") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("CannedId"); - - b.HasIndex("ComponentId"); - - b.ToTable("CannedComponents"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.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("FishFactoryDatabaseImplement.Models.Component", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ComponentName") - .IsRequired() - .HasColumnType("text"); - - b.Property("Cost") - .HasColumnType("double precision"); - - b.HasKey("Id"); - - b.ToTable("Components"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.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("FishFactoryDatabaseImplement.Models.Order", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CannedId") - .HasColumnType("integer"); - - b.Property("ClientId") - .HasColumnType("integer"); - - b.Property("Count") - .HasColumnType("integer"); - - b.Property("DateCreate") - .HasColumnType("timestamp without time zone"); - - b.Property("DateImplement") - .HasColumnType("timestamp without time zone"); - - b.Property("ImplementerId") - .IsRequired() - .HasColumnType("integer"); - - b.Property("Status") - .HasColumnType("integer"); - - b.Property("Sum") - .HasColumnType("double precision"); - - b.HasKey("Id"); - - b.HasIndex("CannedId"); - - b.HasIndex("ClientId"); - - b.HasIndex("ImplementerId"); - - b.ToTable("Orders"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.CannedComponent", b => - { - b.HasOne("FishFactoryDatabaseImplement.Models.Canned", "Canned") - .WithMany("Components") - .HasForeignKey("CannedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("FishFactoryDatabaseImplement.Models.Component", "Component") - .WithMany("CannedComponents") - .HasForeignKey("ComponentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Canned"); - - b.Navigation("Component"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Order", b => - { - b.HasOne("FishFactoryDatabaseImplement.Models.Canned", "Canned") - .WithMany("Orders") - .HasForeignKey("CannedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("FishFactoryDatabaseImplement.Models.Client", "Client") - .WithMany() - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("FishFactoryDatabaseImplement.Models.Implementer", "Implementer") - .WithMany("Order") - .HasForeignKey("ImplementerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Canned"); - - b.Navigation("Client"); - - b.Navigation("Implementer"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Canned", b => - { - b.Navigation("Components"); - - b.Navigation("Orders"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Component", b => - { - b.Navigation("CannedComponents"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Implementer", b => - { - b.Navigation("Order"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/FishFactoryDatabaseImplement/Migrations/20240513152048_add_implementer.Designer.cs b/FishFactoryDatabaseImplement/Migrations/20240513152048_add_implementer.Designer.cs deleted file mode 100644 index 047d932..0000000 --- a/FishFactoryDatabaseImplement/Migrations/20240513152048_add_implementer.Designer.cs +++ /dev/null @@ -1,255 +0,0 @@ -// -using System; -using FishFactoryDatabaseImplement; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace FishFactoryDatabaseImplement.Migrations -{ - [DbContext(typeof(FishFactoryDatabase))] - [Migration("20240513152048_add_implementer")] - partial class add_implementer - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.16") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Canned", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CannedName") - .IsRequired() - .HasColumnType("text"); - - b.Property("Price") - .HasColumnType("double precision"); - - b.HasKey("Id"); - - b.ToTable("Canneds"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.CannedComponent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CannedId") - .HasColumnType("integer"); - - b.Property("ComponentId") - .HasColumnType("integer"); - - b.Property("Count") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("CannedId"); - - b.HasIndex("ComponentId"); - - b.ToTable("CannedComponents"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.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("FishFactoryDatabaseImplement.Models.Component", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ComponentName") - .IsRequired() - .HasColumnType("text"); - - b.Property("Cost") - .HasColumnType("double precision"); - - b.HasKey("Id"); - - b.ToTable("Components"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.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("FishFactoryDatabaseImplement.Models.Order", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CannedId") - .HasColumnType("integer"); - - b.Property("ClientId") - .HasColumnType("integer"); - - b.Property("Count") - .HasColumnType("integer"); - - b.Property("DateCreate") - .HasColumnType("timestamp without time zone"); - - b.Property("DateImplement") - .HasColumnType("timestamp without time zone"); - - b.Property("ImplementerId") - .IsRequired() - .HasColumnType("integer"); - - b.Property("Status") - .HasColumnType("integer"); - - b.Property("Sum") - .HasColumnType("double precision"); - - b.HasKey("Id"); - - b.HasIndex("CannedId"); - - b.HasIndex("ClientId"); - - b.HasIndex("ImplementerId"); - - b.ToTable("Orders"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.CannedComponent", b => - { - b.HasOne("FishFactoryDatabaseImplement.Models.Canned", "Canned") - .WithMany("Components") - .HasForeignKey("CannedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("FishFactoryDatabaseImplement.Models.Component", "Component") - .WithMany("CannedComponents") - .HasForeignKey("ComponentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Canned"); - - b.Navigation("Component"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Order", b => - { - b.HasOne("FishFactoryDatabaseImplement.Models.Canned", "Canned") - .WithMany("Orders") - .HasForeignKey("CannedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("FishFactoryDatabaseImplement.Models.Client", "Client") - .WithMany() - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("FishFactoryDatabaseImplement.Models.Implementer", "Implementer") - .WithMany("Order") - .HasForeignKey("ImplementerId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Canned"); - - b.Navigation("Client"); - - b.Navigation("Implementer"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Canned", b => - { - b.Navigation("Components"); - - b.Navigation("Orders"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Component", b => - { - b.Navigation("CannedComponents"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Implementer", b => - { - b.Navigation("Order"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/FishFactoryDatabaseImplement/Migrations/20240513152048_add_implementer.cs b/FishFactoryDatabaseImplement/Migrations/20240513152048_add_implementer.cs deleted file mode 100644 index 0077077..0000000 --- a/FishFactoryDatabaseImplement/Migrations/20240513152048_add_implementer.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace FishFactoryDatabaseImplement.Migrations -{ - /// - public partial class add_implementer : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - - } - } -} diff --git a/FishFactoryDatabaseImplement/Migrations/20240513170412_create.Designer.cs b/FishFactoryDatabaseImplement/Migrations/20240513170412_create.Designer.cs deleted file mode 100644 index 982acdf..0000000 --- a/FishFactoryDatabaseImplement/Migrations/20240513170412_create.Designer.cs +++ /dev/null @@ -1,252 +0,0 @@ -// -using System; -using FishFactoryDatabaseImplement; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace FishFactoryDatabaseImplement.Migrations -{ - [DbContext(typeof(FishFactoryDatabase))] - [Migration("20240513170412_create")] - partial class create - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.16") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Canned", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CannedName") - .IsRequired() - .HasColumnType("text"); - - b.Property("Price") - .HasColumnType("double precision"); - - b.HasKey("Id"); - - b.ToTable("Canneds"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.CannedComponent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CannedId") - .HasColumnType("integer"); - - b.Property("ComponentId") - .HasColumnType("integer"); - - b.Property("Count") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("CannedId"); - - b.HasIndex("ComponentId"); - - b.ToTable("CannedComponents"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.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("FishFactoryDatabaseImplement.Models.Component", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ComponentName") - .IsRequired() - .HasColumnType("text"); - - b.Property("Cost") - .HasColumnType("double precision"); - - b.HasKey("Id"); - - b.ToTable("Components"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.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("FishFactoryDatabaseImplement.Models.Order", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CannedId") - .HasColumnType("integer"); - - b.Property("ClientId") - .HasColumnType("integer"); - - b.Property("Count") - .HasColumnType("integer"); - - b.Property("DateCreate") - .HasColumnType("timestamp without time zone"); - - b.Property("DateImplement") - .HasColumnType("timestamp without time zone"); - - b.Property("ImplementerId") - .HasColumnType("integer"); - - b.Property("Status") - .HasColumnType("integer"); - - b.Property("Sum") - .HasColumnType("double precision"); - - b.HasKey("Id"); - - b.HasIndex("CannedId"); - - b.HasIndex("ClientId"); - - b.HasIndex("ImplementerId"); - - b.ToTable("Orders"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.CannedComponent", b => - { - b.HasOne("FishFactoryDatabaseImplement.Models.Canned", "Canned") - .WithMany("Components") - .HasForeignKey("CannedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("FishFactoryDatabaseImplement.Models.Component", "Component") - .WithMany("CannedComponents") - .HasForeignKey("ComponentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Canned"); - - b.Navigation("Component"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Order", b => - { - b.HasOne("FishFactoryDatabaseImplement.Models.Canned", "Canned") - .WithMany("Orders") - .HasForeignKey("CannedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("FishFactoryDatabaseImplement.Models.Client", "Client") - .WithMany() - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("FishFactoryDatabaseImplement.Models.Implementer", "Implementer") - .WithMany("Order") - .HasForeignKey("ImplementerId"); - - b.Navigation("Canned"); - - b.Navigation("Client"); - - b.Navigation("Implementer"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Canned", b => - { - b.Navigation("Components"); - - b.Navigation("Orders"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Component", b => - { - b.Navigation("CannedComponents"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Implementer", b => - { - b.Navigation("Order"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/FishFactoryDatabaseImplement/Migrations/20240513170412_create.cs b/FishFactoryDatabaseImplement/Migrations/20240513170412_create.cs deleted file mode 100644 index c4820f4..0000000 --- a/FishFactoryDatabaseImplement/Migrations/20240513170412_create.cs +++ /dev/null @@ -1,59 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace FishFactoryDatabaseImplement.Migrations -{ - /// - public partial class create : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_Orders_Implementers_ImplementerId", - table: "Orders"); - - migrationBuilder.AlterColumn( - name: "ImplementerId", - table: "Orders", - type: "integer", - nullable: true, - oldClrType: typeof(int), - oldType: "integer"); - - migrationBuilder.AddForeignKey( - name: "FK_Orders_Implementers_ImplementerId", - table: "Orders", - column: "ImplementerId", - principalTable: "Implementers", - principalColumn: "Id"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropForeignKey( - name: "FK_Orders_Implementers_ImplementerId", - table: "Orders"); - - migrationBuilder.AlterColumn( - name: "ImplementerId", - table: "Orders", - type: "integer", - nullable: false, - defaultValue: 0, - oldClrType: typeof(int), - oldType: "integer", - oldNullable: true); - - migrationBuilder.AddForeignKey( - name: "FK_Orders_Implementers_ImplementerId", - table: "Orders", - column: "ImplementerId", - principalTable: "Implementers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - } - } -} diff --git a/FishFactoryDatabaseImplement/Migrations/20240514140738_implementer.Designer.cs b/FishFactoryDatabaseImplement/Migrations/20240514140738_implementer.Designer.cs deleted file mode 100644 index 6915550..0000000 --- a/FishFactoryDatabaseImplement/Migrations/20240514140738_implementer.Designer.cs +++ /dev/null @@ -1,252 +0,0 @@ -// -using System; -using FishFactoryDatabaseImplement; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace FishFactoryDatabaseImplement.Migrations -{ - [DbContext(typeof(FishFactoryDatabase))] - [Migration("20240514140738_implementer")] - partial class implementer - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.16") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Canned", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CannedName") - .IsRequired() - .HasColumnType("text"); - - b.Property("Price") - .HasColumnType("double precision"); - - b.HasKey("Id"); - - b.ToTable("Canneds"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.CannedComponent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CannedId") - .HasColumnType("integer"); - - b.Property("ComponentId") - .HasColumnType("integer"); - - b.Property("Count") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("CannedId"); - - b.HasIndex("ComponentId"); - - b.ToTable("CannedComponents"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.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("FishFactoryDatabaseImplement.Models.Component", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ComponentName") - .IsRequired() - .HasColumnType("text"); - - b.Property("Cost") - .HasColumnType("double precision"); - - b.HasKey("Id"); - - b.ToTable("Components"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.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("FishFactoryDatabaseImplement.Models.Order", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CannedId") - .HasColumnType("integer"); - - b.Property("ClientId") - .HasColumnType("integer"); - - b.Property("Count") - .HasColumnType("integer"); - - b.Property("DateCreate") - .HasColumnType("timestamp without time zone"); - - b.Property("DateImplement") - .HasColumnType("timestamp without time zone"); - - b.Property("ImplementerId") - .HasColumnType("integer"); - - b.Property("Status") - .HasColumnType("integer"); - - b.Property("Sum") - .HasColumnType("double precision"); - - b.HasKey("Id"); - - b.HasIndex("CannedId"); - - b.HasIndex("ClientId"); - - b.HasIndex("ImplementerId"); - - b.ToTable("Orders"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.CannedComponent", b => - { - b.HasOne("FishFactoryDatabaseImplement.Models.Canned", "Canned") - .WithMany("Components") - .HasForeignKey("CannedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("FishFactoryDatabaseImplement.Models.Component", "Component") - .WithMany("CannedComponents") - .HasForeignKey("ComponentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Canned"); - - b.Navigation("Component"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Order", b => - { - b.HasOne("FishFactoryDatabaseImplement.Models.Canned", "Canned") - .WithMany("Orders") - .HasForeignKey("CannedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("FishFactoryDatabaseImplement.Models.Client", "Client") - .WithMany() - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("FishFactoryDatabaseImplement.Models.Implementer", "Implementer") - .WithMany("Order") - .HasForeignKey("ImplementerId"); - - b.Navigation("Canned"); - - b.Navigation("Client"); - - b.Navigation("Implementer"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Canned", b => - { - b.Navigation("Components"); - - b.Navigation("Orders"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Component", b => - { - b.Navigation("CannedComponents"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Implementer", b => - { - b.Navigation("Order"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/FishFactoryDatabaseImplement/Migrations/20240514140738_implementer.cs b/FishFactoryDatabaseImplement/Migrations/20240514140738_implementer.cs deleted file mode 100644 index b171c71..0000000 --- a/FishFactoryDatabaseImplement/Migrations/20240514140738_implementer.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace FishFactoryDatabaseImplement.Migrations -{ - /// - public partial class implementer : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - - } - } -} diff --git a/FishFactoryDatabaseImplement/Migrations/20240514143630_implementer2.Designer.cs b/FishFactoryDatabaseImplement/Migrations/20240514143630_implementer2.Designer.cs deleted file mode 100644 index ac347b6..0000000 --- a/FishFactoryDatabaseImplement/Migrations/20240514143630_implementer2.Designer.cs +++ /dev/null @@ -1,252 +0,0 @@ -// -using System; -using FishFactoryDatabaseImplement; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Migrations; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; - -#nullable disable - -namespace FishFactoryDatabaseImplement.Migrations -{ - [DbContext(typeof(FishFactoryDatabase))] - [Migration("20240514143630_implementer2")] - partial class implementer2 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "7.0.16") - .HasAnnotation("Relational:MaxIdentifierLength", 63); - - NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Canned", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CannedName") - .IsRequired() - .HasColumnType("text"); - - b.Property("Price") - .HasColumnType("double precision"); - - b.HasKey("Id"); - - b.ToTable("Canneds"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.CannedComponent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CannedId") - .HasColumnType("integer"); - - b.Property("ComponentId") - .HasColumnType("integer"); - - b.Property("Count") - .HasColumnType("integer"); - - b.HasKey("Id"); - - b.HasIndex("CannedId"); - - b.HasIndex("ComponentId"); - - b.ToTable("CannedComponents"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.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("FishFactoryDatabaseImplement.Models.Component", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("ComponentName") - .IsRequired() - .HasColumnType("text"); - - b.Property("Cost") - .HasColumnType("double precision"); - - b.HasKey("Id"); - - b.ToTable("Components"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.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("FishFactoryDatabaseImplement.Models.Order", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("integer"); - - NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - - b.Property("CannedId") - .HasColumnType("integer"); - - b.Property("ClientId") - .HasColumnType("integer"); - - b.Property("Count") - .HasColumnType("integer"); - - b.Property("DateCreate") - .HasColumnType("timestamp without time zone"); - - b.Property("DateImplement") - .HasColumnType("timestamp without time zone"); - - b.Property("ImplementerId") - .HasColumnType("integer"); - - b.Property("Status") - .HasColumnType("integer"); - - b.Property("Sum") - .HasColumnType("double precision"); - - b.HasKey("Id"); - - b.HasIndex("CannedId"); - - b.HasIndex("ClientId"); - - b.HasIndex("ImplementerId"); - - b.ToTable("Orders"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.CannedComponent", b => - { - b.HasOne("FishFactoryDatabaseImplement.Models.Canned", "Canned") - .WithMany("Components") - .HasForeignKey("CannedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("FishFactoryDatabaseImplement.Models.Component", "Component") - .WithMany("CannedComponents") - .HasForeignKey("ComponentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Canned"); - - b.Navigation("Component"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Order", b => - { - b.HasOne("FishFactoryDatabaseImplement.Models.Canned", "Canned") - .WithMany("Orders") - .HasForeignKey("CannedId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("FishFactoryDatabaseImplement.Models.Client", "Client") - .WithMany() - .HasForeignKey("ClientId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("FishFactoryDatabaseImplement.Models.Implementer", "Implementer") - .WithMany("Order") - .HasForeignKey("ImplementerId"); - - b.Navigation("Canned"); - - b.Navigation("Client"); - - b.Navigation("Implementer"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Canned", b => - { - b.Navigation("Components"); - - b.Navigation("Orders"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Component", b => - { - b.Navigation("CannedComponents"); - }); - - modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Implementer", b => - { - b.Navigation("Order"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/FishFactoryDatabaseImplement/Migrations/20240514143630_implementer2.cs b/FishFactoryDatabaseImplement/Migrations/20240514143630_implementer2.cs deleted file mode 100644 index 7105be2..0000000 --- a/FishFactoryDatabaseImplement/Migrations/20240514143630_implementer2.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace FishFactoryDatabaseImplement.Migrations -{ - /// - public partial class implementer2 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - - } - } -} diff --git a/FishFactoryDatabaseImplement/Migrations/20240514161521_implementer2.cs b/FishFactoryDatabaseImplement/Migrations/20240514161521_implementer2.cs deleted file mode 100644 index e91eadf..0000000 --- a/FishFactoryDatabaseImplement/Migrations/20240514161521_implementer2.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace FishFactoryDatabaseImplement.Migrations -{ - /// - public partial class implementer2 : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "MessageInfos", - columns: table => new - { - MessageId = table.Column(type: "text", nullable: false), - ClientId = table.Column(type: "integer", nullable: true), - SenderName = table.Column(type: "text", nullable: false), - DateDelivery = table.Column(type: "timestamp without time zone", nullable: false), - Subject = table.Column(type: "text", nullable: false), - Body = table.Column(type: "text", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_MessageInfos", x => x.MessageId); - table.ForeignKey( - name: "FK_MessageInfos_Clients_ClientId", - column: x => x.ClientId, - principalTable: "Clients", - principalColumn: "Id"); - }); - - migrationBuilder.CreateIndex( - name: "IX_MessageInfos_ClientId", - table: "MessageInfos", - column: "ClientId"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "MessageInfos"); - } - } -} diff --git a/FishFactoryDatabaseImplement/Migrations/20240514161521_implementer2.Designer.cs b/FishFactoryDatabaseImplement/Migrations/20240621171359_create.Designer.cs similarity index 97% rename from FishFactoryDatabaseImplement/Migrations/20240514161521_implementer2.Designer.cs rename to FishFactoryDatabaseImplement/Migrations/20240621171359_create.Designer.cs index ac48b11..47ba412 100644 --- a/FishFactoryDatabaseImplement/Migrations/20240514161521_implementer2.Designer.cs +++ b/FishFactoryDatabaseImplement/Migrations/20240621171359_create.Designer.cs @@ -12,8 +12,8 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace FishFactoryDatabaseImplement.Migrations { [DbContext(typeof(FishFactoryDatabase))] - [Migration("20240514161521_implementer2")] - partial class implementer2 + [Migration("20240621171359_create")] + partial class create { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -238,7 +238,7 @@ namespace FishFactoryDatabaseImplement.Migrations modelBuilder.Entity("FishFactoryDatabaseImplement.Models.MessageInfo", b => { b.HasOne("FishFactoryDatabaseImplement.Models.Client", "Client") - .WithMany() + .WithMany("ClientMessages") .HasForeignKey("ClientId"); b.Navigation("Client"); @@ -276,6 +276,11 @@ namespace FishFactoryDatabaseImplement.Migrations b.Navigation("Orders"); }); + modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Client", b => + { + b.Navigation("ClientMessages"); + }); + modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Component", b => { b.Navigation("CannedComponents"); diff --git a/FishFactoryDatabaseImplement/Migrations/20240513132159_initialcreate.cs b/FishFactoryDatabaseImplement/Migrations/20240621171359_create.cs similarity index 84% rename from FishFactoryDatabaseImplement/Migrations/20240513132159_initialcreate.cs rename to FishFactoryDatabaseImplement/Migrations/20240621171359_create.cs index 7dd70b9..201876b 100644 --- a/FishFactoryDatabaseImplement/Migrations/20240513132159_initialcreate.cs +++ b/FishFactoryDatabaseImplement/Migrations/20240621171359_create.cs @@ -7,7 +7,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace FishFactoryDatabaseImplement.Migrations { /// - public partial class initialcreate : Migration + public partial class create : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) @@ -71,6 +71,27 @@ namespace FishFactoryDatabaseImplement.Migrations table.PrimaryKey("PK_Implementers", x => x.Id); }); + migrationBuilder.CreateTable( + name: "MessageInfos", + columns: table => new + { + MessageId = table.Column(type: "text", nullable: false), + ClientId = table.Column(type: "integer", nullable: true), + SenderName = table.Column(type: "text", nullable: false), + DateDelivery = table.Column(type: "timestamp without time zone", nullable: false), + Subject = table.Column(type: "text", nullable: false), + Body = table.Column(type: "text", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_MessageInfos", x => x.MessageId); + table.ForeignKey( + name: "FK_MessageInfos_Clients_ClientId", + column: x => x.ClientId, + principalTable: "Clients", + principalColumn: "Id"); + }); + migrationBuilder.CreateTable( name: "CannedComponents", columns: table => new @@ -106,7 +127,7 @@ namespace FishFactoryDatabaseImplement.Migrations .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), CannedId = table.Column(type: "integer", nullable: false), ClientId = table.Column(type: "integer", nullable: false), - ImplementerId = table.Column(type: "integer", nullable: false), + ImplementerId = table.Column(type: "integer", nullable: true), Count = table.Column(type: "integer", nullable: false), Sum = table.Column(type: "double precision", nullable: false), Status = table.Column(type: "integer", nullable: false), @@ -132,8 +153,7 @@ namespace FishFactoryDatabaseImplement.Migrations name: "FK_Orders_Implementers_ImplementerId", column: x => x.ImplementerId, principalTable: "Implementers", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); + principalColumn: "Id"); }); migrationBuilder.CreateIndex( @@ -146,6 +166,11 @@ namespace FishFactoryDatabaseImplement.Migrations table: "CannedComponents", column: "ComponentId"); + migrationBuilder.CreateIndex( + name: "IX_MessageInfos_ClientId", + table: "MessageInfos", + column: "ClientId"); + migrationBuilder.CreateIndex( name: "IX_Orders_CannedId", table: "Orders", @@ -168,6 +193,9 @@ namespace FishFactoryDatabaseImplement.Migrations migrationBuilder.DropTable( name: "CannedComponents"); + migrationBuilder.DropTable( + name: "MessageInfos"); + migrationBuilder.DropTable( name: "Orders"); diff --git a/FishFactoryDatabaseImplement/Migrations/FishFactoryDatabaseModelSnapshot.cs b/FishFactoryDatabaseImplement/Migrations/FishFactoryDatabaseModelSnapshot.cs index 6fd3024..86b021d 100644 --- a/FishFactoryDatabaseImplement/Migrations/FishFactoryDatabaseModelSnapshot.cs +++ b/FishFactoryDatabaseImplement/Migrations/FishFactoryDatabaseModelSnapshot.cs @@ -235,7 +235,7 @@ namespace FishFactoryDatabaseImplement.Migrations modelBuilder.Entity("FishFactoryDatabaseImplement.Models.MessageInfo", b => { b.HasOne("FishFactoryDatabaseImplement.Models.Client", "Client") - .WithMany() + .WithMany("ClientMessages") .HasForeignKey("ClientId"); b.Navigation("Client"); @@ -273,6 +273,11 @@ namespace FishFactoryDatabaseImplement.Migrations b.Navigation("Orders"); }); + modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Client", b => + { + b.Navigation("ClientMessages"); + }); + modelBuilder.Entity("FishFactoryDatabaseImplement.Models.Component", b => { b.Navigation("CannedComponents");