Правка поля DateDownload в Manual и ManualDto

This commit is contained in:
Olga Nemt 2024-03-19 17:52:45 +05:00
parent 616cb242d6
commit 0df79ee0fc
4 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@ public class ManualDto : IId
/// <summary>
/// Дата загрузки
/// </summary>
public DateTime DateDownload { get; set; }
public DateTimeOffset DateDownload { get; set; }
/// <summary>
/// Id автора

View File

@ -1390,7 +1390,7 @@ namespace AsbCloudDb.Migrations
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime>("DateDownload")
b.Property<DateTimeOffset>("DateDownload")
.HasColumnType("timestamp with time zone")
.HasColumnName("date_download")
.HasComment("Дата загрузки");

View File

@ -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; }

View File

@ -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