diff --git a/FactoryView/FactoryDatabaseImplement/FactoryDatabaseImplement.csproj b/FactoryView/FactoryDatabaseImplement/FactoryDatabaseImplement.csproj
index 132c02c..c5c3096 100644
--- a/FactoryView/FactoryDatabaseImplement/FactoryDatabaseImplement.csproj
+++ b/FactoryView/FactoryDatabaseImplement/FactoryDatabaseImplement.csproj
@@ -6,4 +6,18 @@
enable
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
diff --git a/FactoryView/FactoryDatabaseImplement/Migrations/20230402190902_initmigration.Designer.cs b/FactoryView/FactoryDatabaseImplement/Migrations/20230402190902_initmigration.Designer.cs
deleted file mode 100644
index f842240..0000000
--- a/FactoryView/FactoryDatabaseImplement/Migrations/20230402190902_initmigration.Designer.cs
+++ /dev/null
@@ -1,447 +0,0 @@
-//
-using FactoryDatabaseImplement;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace FactoryDatabaseImplement.Migrations
-{
- [DbContext(typeof(FactoryDatabase))]
- [Migration("20230402190902_initmigration")]
- partial class initmigration
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "7.0.4")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Component", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ComponentName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Cost")
- .HasColumnType("float");
-
- b.Property("EnginierId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.ToTable("Components");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Engenier", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Email")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Fio")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.ToTable("Engeniers");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Lathe", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("BusyId")
- .HasColumnType("int");
-
- b.Property("LatheName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("MasterId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("BusyId");
-
- b.HasIndex("MasterId");
-
- b.ToTable("Lathes");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.LatheBusy", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Percent")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.ToTable("LatheBusies");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.LatheReinforced", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("LatheId")
- .HasColumnType("int");
-
- b.Property("ReinforcedId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("LatheId");
-
- b.HasIndex("ReinforcedId");
-
- b.ToTable("LatheReinforcedes");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Master", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Email")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Fio")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.ToTable("Masters");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Plan", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("PlanName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.ToTable("Plans");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanComponents", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ComponentId")
- .HasColumnType("int");
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("PlanId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("ComponentId");
-
- b.HasIndex("PlanId");
-
- b.ToTable("PlanComponents");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanLathe", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("LatheId")
- .HasColumnType("int");
-
- b.Property("PlanId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("LatheId");
-
- b.HasIndex("PlanId");
-
- b.ToTable("PlanLathes");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Reinforced", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("EngenierId")
- .HasColumnType("int");
-
- b.Property("Price")
- .HasColumnType("float");
-
- b.Property("ReinforcedName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.HasIndex("EngenierId");
-
- b.ToTable("Reinforceds");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.ReinforcedComponent", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ComponentId")
- .HasColumnType("int");
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("ReinforcedId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("ComponentId");
-
- b.HasIndex("ReinforcedId");
-
- b.ToTable("ReinforcedComponents");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Stage", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("PlanId")
- .HasColumnType("int");
-
- b.Property("ReinforsedId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.ToTable("Stages");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Lathe", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.LatheBusy", null)
- .WithMany("Lathes")
- .HasForeignKey("BusyId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("FactoryDatabaseImplement.Models.Master", null)
- .WithMany("LatheId")
- .HasForeignKey("MasterId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.LatheReinforced", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.Lathe", "Lathe")
- .WithMany("Reinforceds")
- .HasForeignKey("LatheId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("FactoryDatabaseImplement.Models.Reinforced", "Reinforced")
- .WithMany()
- .HasForeignKey("ReinforcedId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Lathe");
-
- b.Navigation("Reinforced");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanComponents", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.Component", "Component")
- .WithMany()
- .HasForeignKey("ComponentId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("FactoryDatabaseImplement.Models.Plan", "Plan")
- .WithMany("Components")
- .HasForeignKey("PlanId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Component");
-
- b.Navigation("Plan");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanLathe", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.Lathe", "Lathe")
- .WithMany()
- .HasForeignKey("LatheId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("FactoryDatabaseImplement.Models.Plan", "Plan")
- .WithMany("Lathes")
- .HasForeignKey("PlanId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Lathe");
-
- b.Navigation("Plan");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Reinforced", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.Engenier", null)
- .WithMany("Reinforceds")
- .HasForeignKey("EngenierId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.ReinforcedComponent", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.Component", "Component")
- .WithMany("ReinforcedComponents")
- .HasForeignKey("ComponentId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("FactoryDatabaseImplement.Models.Reinforced", "Reinforced")
- .WithMany("Components")
- .HasForeignKey("ReinforcedId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Component");
-
- b.Navigation("Reinforced");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Component", b =>
- {
- b.Navigation("ReinforcedComponents");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Engenier", b =>
- {
- b.Navigation("Reinforceds");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Lathe", b =>
- {
- b.Navigation("Reinforceds");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.LatheBusy", b =>
- {
- b.Navigation("Lathes");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Master", b =>
- {
- b.Navigation("LatheId");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Plan", b =>
- {
- b.Navigation("Components");
-
- b.Navigation("Lathes");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Reinforced", b =>
- {
- b.Navigation("Components");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/FactoryView/FactoryDatabaseImplement/Migrations/20230402190902_initmigration.cs b/FactoryView/FactoryDatabaseImplement/Migrations/20230402190902_initmigration.cs
deleted file mode 100644
index 3156c85..0000000
--- a/FactoryView/FactoryDatabaseImplement/Migrations/20230402190902_initmigration.cs
+++ /dev/null
@@ -1,350 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace FactoryDatabaseImplement.Migrations
-{
- ///
- public partial class initmigration : Migration
- {
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "Components",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ComponentName = table.Column(type: "nvarchar(max)", nullable: false),
- Cost = table.Column(type: "float", nullable: false),
- EnginierId = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Components", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "Engeniers",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- Fio = table.Column(type: "nvarchar(max)", nullable: false),
- Email = table.Column(type: "nvarchar(max)", nullable: false),
- Password = table.Column(type: "nvarchar(max)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Engeniers", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "LatheBusies",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- Percent = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_LatheBusies", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "Masters",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- Password = table.Column(type: "nvarchar(max)", nullable: false),
- Fio = table.Column(type: "nvarchar(max)", nullable: false),
- Email = table.Column(type: "nvarchar(max)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Masters", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "Plans",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- PlanName = table.Column(type: "nvarchar(max)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Plans", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "Stages",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- PlanId = table.Column(type: "int", nullable: false),
- ReinforsedId = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Stages", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "Reinforceds",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ReinforcedName = table.Column(type: "nvarchar(max)", nullable: false),
- Price = table.Column(type: "float", nullable: false),
- EngenierId = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Reinforceds", x => x.Id);
- table.ForeignKey(
- name: "FK_Reinforceds_Engeniers_EngenierId",
- column: x => x.EngenierId,
- principalTable: "Engeniers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "Lathes",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- LatheName = table.Column(type: "nvarchar(max)", nullable: false),
- MasterId = table.Column(type: "int", nullable: false),
- BusyId = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Lathes", x => x.Id);
- table.ForeignKey(
- name: "FK_Lathes_LatheBusies_BusyId",
- column: x => x.BusyId,
- principalTable: "LatheBusies",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_Lathes_Masters_MasterId",
- column: x => x.MasterId,
- principalTable: "Masters",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "PlanComponents",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- PlanId = table.Column(type: "int", nullable: false),
- ComponentId = table.Column(type: "int", nullable: false),
- Count = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_PlanComponents", x => x.Id);
- table.ForeignKey(
- name: "FK_PlanComponents_Components_ComponentId",
- column: x => x.ComponentId,
- principalTable: "Components",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_PlanComponents_Plans_PlanId",
- column: x => x.PlanId,
- principalTable: "Plans",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "ReinforcedComponents",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- ReinforcedId = table.Column(type: "int", nullable: false),
- ComponentId = table.Column(type: "int", nullable: false),
- Count = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ReinforcedComponents", x => x.Id);
- table.ForeignKey(
- name: "FK_ReinforcedComponents_Components_ComponentId",
- column: x => x.ComponentId,
- principalTable: "Components",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_ReinforcedComponents_Reinforceds_ReinforcedId",
- column: x => x.ReinforcedId,
- principalTable: "Reinforceds",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "LatheReinforcedes",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- LatheId = table.Column(type: "int", nullable: false),
- ReinforcedId = table.Column(type: "int", nullable: false),
- Count = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_LatheReinforcedes", x => x.Id);
- table.ForeignKey(
- name: "FK_LatheReinforcedes_Lathes_LatheId",
- column: x => x.LatheId,
- principalTable: "Lathes",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_LatheReinforcedes_Reinforceds_ReinforcedId",
- column: x => x.ReinforcedId,
- principalTable: "Reinforceds",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "PlanLathes",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- PlanId = table.Column(type: "int", nullable: false),
- LatheId = table.Column(type: "int", nullable: false),
- Count = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_PlanLathes", x => x.Id);
- table.ForeignKey(
- name: "FK_PlanLathes_Lathes_LatheId",
- column: x => x.LatheId,
- principalTable: "Lathes",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_PlanLathes_Plans_PlanId",
- column: x => x.PlanId,
- principalTable: "Plans",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateIndex(
- name: "IX_LatheReinforcedes_LatheId",
- table: "LatheReinforcedes",
- column: "LatheId");
-
- migrationBuilder.CreateIndex(
- name: "IX_LatheReinforcedes_ReinforcedId",
- table: "LatheReinforcedes",
- column: "ReinforcedId");
-
- migrationBuilder.CreateIndex(
- name: "IX_Lathes_BusyId",
- table: "Lathes",
- column: "BusyId");
-
- migrationBuilder.CreateIndex(
- name: "IX_Lathes_MasterId",
- table: "Lathes",
- column: "MasterId");
-
- migrationBuilder.CreateIndex(
- name: "IX_PlanComponents_ComponentId",
- table: "PlanComponents",
- column: "ComponentId");
-
- migrationBuilder.CreateIndex(
- name: "IX_PlanComponents_PlanId",
- table: "PlanComponents",
- column: "PlanId");
-
- migrationBuilder.CreateIndex(
- name: "IX_PlanLathes_LatheId",
- table: "PlanLathes",
- column: "LatheId");
-
- migrationBuilder.CreateIndex(
- name: "IX_PlanLathes_PlanId",
- table: "PlanLathes",
- column: "PlanId");
-
- migrationBuilder.CreateIndex(
- name: "IX_ReinforcedComponents_ComponentId",
- table: "ReinforcedComponents",
- column: "ComponentId");
-
- migrationBuilder.CreateIndex(
- name: "IX_ReinforcedComponents_ReinforcedId",
- table: "ReinforcedComponents",
- column: "ReinforcedId");
-
- migrationBuilder.CreateIndex(
- name: "IX_Reinforceds_EngenierId",
- table: "Reinforceds",
- column: "EngenierId");
- }
-
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "LatheReinforcedes");
-
- migrationBuilder.DropTable(
- name: "PlanComponents");
-
- migrationBuilder.DropTable(
- name: "PlanLathes");
-
- migrationBuilder.DropTable(
- name: "ReinforcedComponents");
-
- migrationBuilder.DropTable(
- name: "Stages");
-
- migrationBuilder.DropTable(
- name: "Lathes");
-
- migrationBuilder.DropTable(
- name: "Plans");
-
- migrationBuilder.DropTable(
- name: "Components");
-
- migrationBuilder.DropTable(
- name: "Reinforceds");
-
- migrationBuilder.DropTable(
- name: "LatheBusies");
-
- migrationBuilder.DropTable(
- name: "Masters");
-
- migrationBuilder.DropTable(
- name: "Engeniers");
- }
- }
-}
diff --git a/FactoryView/FactoryDatabaseImplement/Migrations/20230402191341_initmigration1.Designer.cs b/FactoryView/FactoryDatabaseImplement/Migrations/20230402191341_initmigration1.Designer.cs
deleted file mode 100644
index 6fba762..0000000
--- a/FactoryView/FactoryDatabaseImplement/Migrations/20230402191341_initmigration1.Designer.cs
+++ /dev/null
@@ -1,473 +0,0 @@
-//
-using System;
-using FactoryDatabaseImplement;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace FactoryDatabaseImplement.Migrations
-{
- [DbContext(typeof(FactoryDatabase))]
- [Migration("20230402191341_initmigration1")]
- partial class initmigration1
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "7.0.4")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Component", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ComponentName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Cost")
- .HasColumnType("float");
-
- b.Property("EnginierId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.ToTable("Components");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Engenier", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Email")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Fio")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.ToTable("Engeniers");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Lathe", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("BusyId")
- .HasColumnType("int");
-
- b.Property("LatheName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("MasterId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("BusyId");
-
- b.HasIndex("MasterId");
-
- b.ToTable("Lathes");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.LatheBusy", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Percent")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.ToTable("LatheBusies");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.LatheReinforced", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("LatheId")
- .HasColumnType("int");
-
- b.Property("ReinforcedId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("LatheId");
-
- b.HasIndex("ReinforcedId");
-
- b.ToTable("LatheReinforcedes");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Master", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Email")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Fio")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.ToTable("Masters");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Plan", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ComponentId")
- .HasColumnType("int");
-
- b.Property("PlanId")
- .HasColumnType("int");
-
- b.Property("PlanName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.HasIndex("ComponentId");
-
- b.HasIndex("PlanId");
-
- b.ToTable("Plans");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanComponents", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ComponentId")
- .HasColumnType("int");
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("PlanId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("ComponentId");
-
- b.HasIndex("PlanId");
-
- b.ToTable("PlanComponents");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanLathe", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("LatheId")
- .HasColumnType("int");
-
- b.Property("PlanId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("LatheId");
-
- b.HasIndex("PlanId");
-
- b.ToTable("PlanLathes");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Reinforced", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("EngenierId")
- .HasColumnType("int");
-
- b.Property("Price")
- .HasColumnType("float");
-
- b.Property("ReinforcedName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.HasIndex("EngenierId");
-
- b.ToTable("Reinforceds");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.ReinforcedComponent", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ComponentId")
- .HasColumnType("int");
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("ReinforcedId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("ComponentId");
-
- b.HasIndex("ReinforcedId");
-
- b.ToTable("ReinforcedComponents");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Stage", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("PlanId")
- .HasColumnType("int");
-
- b.Property("ReinforsedId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.ToTable("Stages");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Lathe", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.LatheBusy", null)
- .WithMany("Lathes")
- .HasForeignKey("BusyId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("FactoryDatabaseImplement.Models.Master", null)
- .WithMany("LatheId")
- .HasForeignKey("MasterId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.LatheReinforced", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.Lathe", "Lathe")
- .WithMany("Reinforceds")
- .HasForeignKey("LatheId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("FactoryDatabaseImplement.Models.Reinforced", "Reinforced")
- .WithMany()
- .HasForeignKey("ReinforcedId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Lathe");
-
- b.Navigation("Reinforced");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Plan", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.Component", null)
- .WithMany("Plans")
- .HasForeignKey("ComponentId");
-
- b.HasOne("FactoryDatabaseImplement.Models.Plan", null)
- .WithMany("Plans")
- .HasForeignKey("PlanId");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanComponents", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.Component", "Component")
- .WithMany()
- .HasForeignKey("ComponentId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("FactoryDatabaseImplement.Models.Plan", "Plan")
- .WithMany("Components")
- .HasForeignKey("PlanId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Component");
-
- b.Navigation("Plan");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanLathe", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.Lathe", "Lathe")
- .WithMany()
- .HasForeignKey("LatheId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("FactoryDatabaseImplement.Models.Plan", "Plan")
- .WithMany("Lathes")
- .HasForeignKey("PlanId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Lathe");
-
- b.Navigation("Plan");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Reinforced", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.Engenier", null)
- .WithMany("Reinforceds")
- .HasForeignKey("EngenierId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.ReinforcedComponent", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.Component", "Component")
- .WithMany("ReinforcedComponents")
- .HasForeignKey("ComponentId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("FactoryDatabaseImplement.Models.Reinforced", "Reinforced")
- .WithMany("Components")
- .HasForeignKey("ReinforcedId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Component");
-
- b.Navigation("Reinforced");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Component", b =>
- {
- b.Navigation("Plans");
-
- b.Navigation("ReinforcedComponents");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Engenier", b =>
- {
- b.Navigation("Reinforceds");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Lathe", b =>
- {
- b.Navigation("Reinforceds");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.LatheBusy", b =>
- {
- b.Navigation("Lathes");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Master", b =>
- {
- b.Navigation("LatheId");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Plan", b =>
- {
- b.Navigation("Components");
-
- b.Navigation("Lathes");
-
- b.Navigation("Plans");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Reinforced", b =>
- {
- b.Navigation("Components");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/FactoryView/FactoryDatabaseImplement/Migrations/20230402191341_initmigration1.cs b/FactoryView/FactoryDatabaseImplement/Migrations/20230402191341_initmigration1.cs
deleted file mode 100644
index 75a5c30..0000000
--- a/FactoryView/FactoryDatabaseImplement/Migrations/20230402191341_initmigration1.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace FactoryDatabaseImplement.Migrations
-{
- ///
- public partial class initmigration1 : Migration
- {
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AddColumn(
- name: "ComponentId",
- table: "Plans",
- type: "int",
- nullable: true);
-
- migrationBuilder.AddColumn(
- name: "PlanId",
- table: "Plans",
- type: "int",
- nullable: true);
-
- migrationBuilder.CreateIndex(
- name: "IX_Plans_ComponentId",
- table: "Plans",
- column: "ComponentId");
-
- migrationBuilder.CreateIndex(
- name: "IX_Plans_PlanId",
- table: "Plans",
- column: "PlanId");
-
- migrationBuilder.AddForeignKey(
- name: "FK_Plans_Components_ComponentId",
- table: "Plans",
- column: "ComponentId",
- principalTable: "Components",
- principalColumn: "Id");
-
- migrationBuilder.AddForeignKey(
- name: "FK_Plans_Plans_PlanId",
- table: "Plans",
- column: "PlanId",
- principalTable: "Plans",
- principalColumn: "Id");
- }
-
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_Plans_Components_ComponentId",
- table: "Plans");
-
- migrationBuilder.DropForeignKey(
- name: "FK_Plans_Plans_PlanId",
- table: "Plans");
-
- migrationBuilder.DropIndex(
- name: "IX_Plans_ComponentId",
- table: "Plans");
-
- migrationBuilder.DropIndex(
- name: "IX_Plans_PlanId",
- table: "Plans");
-
- migrationBuilder.DropColumn(
- name: "ComponentId",
- table: "Plans");
-
- migrationBuilder.DropColumn(
- name: "PlanId",
- table: "Plans");
- }
- }
-}
diff --git a/FactoryView/FactoryDatabaseImplement/Migrations/20230402191647_initmigration2.Designer.cs b/FactoryView/FactoryDatabaseImplement/Migrations/20230402191647_initmigration2.Designer.cs
deleted file mode 100644
index 03582e1..0000000
--- a/FactoryView/FactoryDatabaseImplement/Migrations/20230402191647_initmigration2.Designer.cs
+++ /dev/null
@@ -1,472 +0,0 @@
-//
-using System;
-using FactoryDatabaseImplement;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace FactoryDatabaseImplement.Migrations
-{
- [DbContext(typeof(FactoryDatabase))]
- [Migration("20230402191647_initmigration2")]
- partial class initmigration2
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "7.0.4")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Component", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ComponentName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Cost")
- .HasColumnType("float");
-
- b.Property("EnginierId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.ToTable("Components");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Engenier", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Email")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Fio")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.ToTable("Engeniers");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Lathe", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("BusyId")
- .HasColumnType("int");
-
- b.Property("LatheName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("MasterId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("BusyId");
-
- b.HasIndex("MasterId");
-
- b.ToTable("Lathes");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.LatheBusy", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Percent")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.ToTable("LatheBusies");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.LatheReinforced", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("LatheId")
- .HasColumnType("int");
-
- b.Property("ReinforcedId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("LatheId");
-
- b.HasIndex("ReinforcedId");
-
- b.ToTable("LatheReinforcedes");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Master", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Email")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Fio")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.ToTable("Masters");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Plan", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("PlanName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.ToTable("Plans");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanComponents", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ComponentId")
- .HasColumnType("int");
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("PlanId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("ComponentId");
-
- b.HasIndex("PlanId");
-
- b.ToTable("PlanComponents");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanLathe", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("LatheId")
- .HasColumnType("int");
-
- b.Property("PlanId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("LatheId");
-
- b.HasIndex("PlanId");
-
- b.ToTable("PlanLathes");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Reinforced", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("EngenierId")
- .HasColumnType("int");
-
- b.Property("Price")
- .HasColumnType("float");
-
- b.Property("ReinforcedName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.HasIndex("EngenierId");
-
- b.ToTable("Reinforceds");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.ReinforcedComponent", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ComponentId")
- .HasColumnType("int");
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("ReinforcedId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("ComponentId");
-
- b.HasIndex("ReinforcedId");
-
- b.ToTable("ReinforcedComponents");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Stage", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ComponentId")
- .HasColumnType("int");
-
- b.Property("PlanId")
- .HasColumnType("int");
-
- b.Property("ReinforsedId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("ComponentId");
-
- b.HasIndex("PlanId");
-
- b.ToTable("Stages");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Lathe", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.LatheBusy", null)
- .WithMany("Lathes")
- .HasForeignKey("BusyId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("FactoryDatabaseImplement.Models.Master", null)
- .WithMany("LatheId")
- .HasForeignKey("MasterId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.LatheReinforced", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.Lathe", "Lathe")
- .WithMany("Reinforceds")
- .HasForeignKey("LatheId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("FactoryDatabaseImplement.Models.Reinforced", "Reinforced")
- .WithMany()
- .HasForeignKey("ReinforcedId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Lathe");
-
- b.Navigation("Reinforced");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanComponents", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.Component", "Component")
- .WithMany()
- .HasForeignKey("ComponentId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("FactoryDatabaseImplement.Models.Plan", "Plan")
- .WithMany("Components")
- .HasForeignKey("PlanId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Component");
-
- b.Navigation("Plan");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanLathe", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.Lathe", "Lathe")
- .WithMany()
- .HasForeignKey("LatheId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("FactoryDatabaseImplement.Models.Plan", "Plan")
- .WithMany("Lathes")
- .HasForeignKey("PlanId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Lathe");
-
- b.Navigation("Plan");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Reinforced", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.Engenier", null)
- .WithMany("Reinforceds")
- .HasForeignKey("EngenierId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.ReinforcedComponent", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.Component", "Component")
- .WithMany("ReinforcedComponents")
- .HasForeignKey("ComponentId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("FactoryDatabaseImplement.Models.Reinforced", "Reinforced")
- .WithMany("Components")
- .HasForeignKey("ReinforcedId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Component");
-
- b.Navigation("Reinforced");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Stage", b =>
- {
- b.HasOne("FactoryDatabaseImplement.Models.Component", null)
- .WithMany("Stages")
- .HasForeignKey("ComponentId");
-
- b.HasOne("FactoryDatabaseImplement.Models.Plan", null)
- .WithMany("Stages")
- .HasForeignKey("PlanId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Component", b =>
- {
- b.Navigation("ReinforcedComponents");
-
- b.Navigation("Stages");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Engenier", b =>
- {
- b.Navigation("Reinforceds");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Lathe", b =>
- {
- b.Navigation("Reinforceds");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.LatheBusy", b =>
- {
- b.Navigation("Lathes");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Master", b =>
- {
- b.Navigation("LatheId");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Plan", b =>
- {
- b.Navigation("Components");
-
- b.Navigation("Lathes");
-
- b.Navigation("Stages");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Reinforced", b =>
- {
- b.Navigation("Components");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/FactoryView/FactoryDatabaseImplement/Migrations/20230402191647_initmigration2.cs b/FactoryView/FactoryDatabaseImplement/Migrations/20230402191647_initmigration2.cs
deleted file mode 100644
index 6895af5..0000000
--- a/FactoryView/FactoryDatabaseImplement/Migrations/20230402191647_initmigration2.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace FactoryDatabaseImplement.Migrations
-{
- ///
- public partial class initmigration2 : Migration
- {
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_Plans_Components_ComponentId",
- table: "Plans");
-
- migrationBuilder.DropForeignKey(
- name: "FK_Plans_Plans_PlanId",
- table: "Plans");
-
- migrationBuilder.DropIndex(
- name: "IX_Plans_ComponentId",
- table: "Plans");
-
- migrationBuilder.DropIndex(
- name: "IX_Plans_PlanId",
- table: "Plans");
-
- migrationBuilder.DropColumn(
- name: "ComponentId",
- table: "Plans");
-
- migrationBuilder.DropColumn(
- name: "PlanId",
- table: "Plans");
-
- migrationBuilder.AddColumn(
- name: "ComponentId",
- table: "Stages",
- type: "int",
- nullable: true);
-
- migrationBuilder.CreateIndex(
- name: "IX_Stages_ComponentId",
- table: "Stages",
- column: "ComponentId");
-
- migrationBuilder.CreateIndex(
- name: "IX_Stages_PlanId",
- table: "Stages",
- column: "PlanId");
-
- migrationBuilder.AddForeignKey(
- name: "FK_Stages_Components_ComponentId",
- table: "Stages",
- column: "ComponentId",
- principalTable: "Components",
- principalColumn: "Id");
-
- migrationBuilder.AddForeignKey(
- name: "FK_Stages_Plans_PlanId",
- table: "Stages",
- column: "PlanId",
- principalTable: "Plans",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- }
-
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_Stages_Components_ComponentId",
- table: "Stages");
-
- migrationBuilder.DropForeignKey(
- name: "FK_Stages_Plans_PlanId",
- table: "Stages");
-
- migrationBuilder.DropIndex(
- name: "IX_Stages_ComponentId",
- table: "Stages");
-
- migrationBuilder.DropIndex(
- name: "IX_Stages_PlanId",
- table: "Stages");
-
- migrationBuilder.DropColumn(
- name: "ComponentId",
- table: "Stages");
-
- migrationBuilder.AddColumn(
- name: "ComponentId",
- table: "Plans",
- type: "int",
- nullable: true);
-
- migrationBuilder.AddColumn(
- name: "PlanId",
- table: "Plans",
- type: "int",
- nullable: true);
-
- migrationBuilder.CreateIndex(
- name: "IX_Plans_ComponentId",
- table: "Plans",
- column: "ComponentId");
-
- migrationBuilder.CreateIndex(
- name: "IX_Plans_PlanId",
- table: "Plans",
- column: "PlanId");
-
- migrationBuilder.AddForeignKey(
- name: "FK_Plans_Components_ComponentId",
- table: "Plans",
- column: "ComponentId",
- principalTable: "Components",
- principalColumn: "Id");
-
- migrationBuilder.AddForeignKey(
- name: "FK_Plans_Plans_PlanId",
- table: "Plans",
- column: "PlanId",
- principalTable: "Plans",
- principalColumn: "Id");
- }
- }
-}
diff --git a/FactoryView/FactoryDatabaseImplement/Migrations/FactoryDatabaseModelSnapshot.cs b/FactoryView/FactoryDatabaseImplement/Migrations/FactoryDatabaseModelSnapshot.cs
deleted file mode 100644
index cebff87..0000000
--- a/FactoryView/FactoryDatabaseImplement/Migrations/FactoryDatabaseModelSnapshot.cs
+++ /dev/null
@@ -1,469 +0,0 @@
-//
-using System;
-using FactoryDatabaseImplement;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace FactoryDatabaseImplement.Migrations
-{
- [DbContext(typeof(FactoryDatabase))]
- partial class FactoryDatabaseModelSnapshot : ModelSnapshot
- {
- protected override void BuildModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "7.0.4")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Component", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ComponentName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Cost")
- .HasColumnType("float");
-
- b.Property("EnginierId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.ToTable("Components");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Engenier", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Email")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Fio")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.ToTable("Engeniers");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Lathe", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("BusyId")
- .HasColumnType("int");
-
- b.Property("LatheName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("MasterId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("BusyId");
-
- b.HasIndex("MasterId");
-
- b.ToTable("Lathes");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.LatheBusy", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Percent")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.ToTable("LatheBusies");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.LatheReinforced", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("LatheId")
- .HasColumnType("int");
-
- b.Property("ReinforcedId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("LatheId");
-
- b.HasIndex("ReinforcedId");
-
- b.ToTable("LatheReinforcedes");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Master", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Email")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Fio")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.ToTable("Masters");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.Plan", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("PlanName")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("Id");
-
- b.ToTable("Plans");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanComponents", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("ComponentId")
- .HasColumnType("int");
-
- b.Property("Count")
- .HasColumnType("int");
-
- b.Property("PlanId")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.HasIndex("ComponentId");
-
- b.HasIndex("PlanId");
-
- b.ToTable("PlanComponents");
- });
-
- modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanLathe", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property