From 0df79ee0fc80699d51b3fe75692619fd7560d965 Mon Sep 17 00:00:00 2001 From: Olga Nemt Date: Tue, 19 Mar 2024 17:52:45 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B0=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D1=8F=20DateDownload=20=D0=B2=20Manual=20=D0=B8=20?= =?UTF-8?q?ManualDto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AsbCloudApp/Data/Manuals/ManualDto.cs | 2 +- AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs | 2 +- AsbCloudDb/Model/Manuals/Manual.cs | 4 ++-- AsbCloudInfrastructure/Services/ManualCatalogService.cs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/AsbCloudApp/Data/Manuals/ManualDto.cs b/AsbCloudApp/Data/Manuals/ManualDto.cs index bb89dfbe..c5aa92c4 100644 --- a/AsbCloudApp/Data/Manuals/ManualDto.cs +++ b/AsbCloudApp/Data/Manuals/ManualDto.cs @@ -18,7 +18,7 @@ public class ManualDto : IId /// /// Дата загрузки /// - public DateTime DateDownload { get; set; } + public DateTimeOffset DateDownload { get; set; } /// /// Id автора diff --git a/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs b/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs index 8f326f19..8bd03355 100644 --- a/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs +++ b/AsbCloudDb/Migrations/AsbCloudDbContextModelSnapshot.cs @@ -1390,7 +1390,7 @@ namespace AsbCloudDb.Migrations NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); - b.Property("DateDownload") + b.Property("DateDownload") .HasColumnType("timestamp with time zone") .HasColumnName("date_download") .HasComment("Дата загрузки"); diff --git a/AsbCloudDb/Model/Manuals/Manual.cs b/AsbCloudDb/Model/Manuals/Manual.cs index 35b091b5..8ab64735 100644 --- a/AsbCloudDb/Model/Manuals/Manual.cs +++ b/AsbCloudDb/Model/Manuals/Manual.cs @@ -15,8 +15,8 @@ public class Manual : IId [Column("name"), Comment("Название")] public string Name { get; set; } = null!; - [Column("date_download"), Comment("Дата загрузки")] - public DateTime DateDownload { get; set; } + [Column("date_download", TypeName = "timestamp with time zone"), Comment("Дата загрузки")] + public DateTimeOffset DateDownload { get; set; } [Column("id_directory"), Comment("Id директории")] public int IdDirectory { get; set; } diff --git a/AsbCloudInfrastructure/Services/ManualCatalogService.cs b/AsbCloudInfrastructure/Services/ManualCatalogService.cs index c8713ab1..8c779bc7 100644 --- a/AsbCloudInfrastructure/Services/ManualCatalogService.cs +++ b/AsbCloudInfrastructure/Services/ManualCatalogService.cs @@ -57,7 +57,7 @@ public class ManualCatalogService : IManualCatalogService var manual = new ManualDto { Name = name, - DateDownload = DateTime.UtcNow, + DateDownload = DateTimeOffset.UtcNow, IdDirectory = idDirectory, IdCategory = IdFileCategory, IdAuthor = idAuthor