diff --git a/HardwareShop/HardwareShopClientApp/HardwareShopStorekeeperApp.csproj b/HardwareShop/HardwareShopClientApp/HardwareShopStorekeeperApp.csproj
index 56e9939..badf8a2 100644
--- a/HardwareShop/HardwareShopClientApp/HardwareShopStorekeeperApp.csproj
+++ b/HardwareShop/HardwareShopClientApp/HardwareShopStorekeeperApp.csproj
@@ -7,6 +7,10 @@
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/HardwareShop/HardwareShopDatabaseImplement/Migrations/20230402135808_init.Designer.cs b/HardwareShop/HardwareShopDatabaseImplement/Migrations/20230406172812_InitMigration.Designer.cs
similarity index 98%
rename from HardwareShop/HardwareShopDatabaseImplement/Migrations/20230402135808_init.Designer.cs
rename to HardwareShop/HardwareShopDatabaseImplement/Migrations/20230406172812_InitMigration.Designer.cs
index a3d0a51..4377936 100644
--- a/HardwareShop/HardwareShopDatabaseImplement/Migrations/20230402135808_init.Designer.cs
+++ b/HardwareShop/HardwareShopDatabaseImplement/Migrations/20230406172812_InitMigration.Designer.cs
@@ -12,8 +12,8 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace HardwareShopDatabaseImplement.Migrations
{
[DbContext(typeof(HardwareShopDatabase))]
- [Migration("20230402135808_init")]
- partial class init
+ [Migration("20230406172812_InitMigration")]
+ partial class InitMigration
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@@ -112,6 +112,9 @@ namespace HardwareShopDatabaseImplement.Migrations
b.Property("Cost")
.HasColumnType("double precision");
+ b.Property("DateCreate")
+ .HasColumnType("timestamp with time zone");
+
b.Property("UserId")
.HasColumnType("integer");
@@ -376,24 +379,20 @@ namespace HardwareShopDatabaseImplement.Migrations
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.Storekeeper.Component", b =>
{
- b.HasOne("HardwareShopDatabaseImplement.Models.User", "User")
+ b.HasOne("HardwareShopDatabaseImplement.Models.User", null)
.WithMany("Components")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
-
- b.Navigation("User");
});
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.Storekeeper.Good", b =>
{
- b.HasOne("HardwareShopDatabaseImplement.Models.User", "User")
+ b.HasOne("HardwareShopDatabaseImplement.Models.User", null)
.WithMany("Goods")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
-
- b.Navigation("User");
});
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.Storekeeper.Order", b =>
@@ -404,15 +403,13 @@ namespace HardwareShopDatabaseImplement.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
- b.HasOne("HardwareShopDatabaseImplement.Models.User", "User")
+ b.HasOne("HardwareShopDatabaseImplement.Models.User", null)
.WithMany("Orders")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Good");
-
- b.Navigation("User");
});
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.Worker.Build", b =>
diff --git a/HardwareShop/HardwareShopDatabaseImplement/Migrations/20230402135808_init.cs b/HardwareShop/HardwareShopDatabaseImplement/Migrations/20230406172812_InitMigration.cs
similarity index 98%
rename from HardwareShop/HardwareShopDatabaseImplement/Migrations/20230402135808_init.cs
rename to HardwareShop/HardwareShopDatabaseImplement/Migrations/20230406172812_InitMigration.cs
index e24fd62..15a98f9 100644
--- a/HardwareShop/HardwareShopDatabaseImplement/Migrations/20230402135808_init.cs
+++ b/HardwareShop/HardwareShopDatabaseImplement/Migrations/20230406172812_InitMigration.cs
@@ -7,7 +7,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace HardwareShopDatabaseImplement.Migrations
{
///
- public partial class init : Migration
+ public partial class InitMigration : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
@@ -57,7 +57,8 @@ namespace HardwareShopDatabaseImplement.Migrations
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ComponentName = table.Column(type: "text", nullable: false),
Cost = table.Column(type: "double precision", nullable: false),
- UserId = table.Column(type: "integer", nullable: false)
+ UserId = table.Column(type: "integer", nullable: false),
+ DateCreate = table.Column(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
diff --git a/HardwareShop/HardwareShopDatabaseImplement/Migrations/HardwareShopDatabaseModelSnapshot.cs b/HardwareShop/HardwareShopDatabaseImplement/Migrations/HardwareShopDatabaseModelSnapshot.cs
index def5cac..e4bc74e 100644
--- a/HardwareShop/HardwareShopDatabaseImplement/Migrations/HardwareShopDatabaseModelSnapshot.cs
+++ b/HardwareShop/HardwareShopDatabaseImplement/Migrations/HardwareShopDatabaseModelSnapshot.cs
@@ -109,6 +109,9 @@ namespace HardwareShopDatabaseImplement.Migrations
b.Property("Cost")
.HasColumnType("double precision");
+ b.Property("DateCreate")
+ .HasColumnType("timestamp with time zone");
+
b.Property("UserId")
.HasColumnType("integer");
@@ -373,24 +376,20 @@ namespace HardwareShopDatabaseImplement.Migrations
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.Storekeeper.Component", b =>
{
- b.HasOne("HardwareShopDatabaseImplement.Models.User", "User")
+ b.HasOne("HardwareShopDatabaseImplement.Models.User", null)
.WithMany("Components")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
-
- b.Navigation("User");
});
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.Storekeeper.Good", b =>
{
- b.HasOne("HardwareShopDatabaseImplement.Models.User", "User")
+ b.HasOne("HardwareShopDatabaseImplement.Models.User", null)
.WithMany("Goods")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
-
- b.Navigation("User");
});
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.Storekeeper.Order", b =>
@@ -401,15 +400,13 @@ namespace HardwareShopDatabaseImplement.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
- b.HasOne("HardwareShopDatabaseImplement.Models.User", "User")
+ b.HasOne("HardwareShopDatabaseImplement.Models.User", null)
.WithMany("Orders")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Good");
-
- b.Navigation("User");
});
modelBuilder.Entity("HardwareShopDatabaseImplement.Models.Worker.Build", b =>