From ea59b38dd6a52e7748539af4e603d871d4fc315b Mon Sep 17 00:00:00 2001 From: Valters Melnalksnis Date: Thu, 18 Jan 2024 19:06:11 +0200 Subject: [PATCH] fix: Use OffsetDateTime in response models (#148) --- .../Correspondents/Correspondent.cs | 2 +- .../Documents/Document.cs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/VMelnalksnis.PaperlessDotNet/Correspondents/Correspondent.cs b/source/VMelnalksnis.PaperlessDotNet/Correspondents/Correspondent.cs index 4c07148..ea28dba 100644 --- a/source/VMelnalksnis.PaperlessDotNet/Correspondents/Correspondent.cs +++ b/source/VMelnalksnis.PaperlessDotNet/Correspondents/Correspondent.cs @@ -37,5 +37,5 @@ public sealed class Correspondent /// Gets or sets the instant when the last document with the correspondent was created. [JsonPropertyName("last_correspondence")] - public Instant? LastCorrespondence { get; set; } + public OffsetDateTime? LastCorrespondence { get; set; } } diff --git a/source/VMelnalksnis.PaperlessDotNet/Documents/Document.cs b/source/VMelnalksnis.PaperlessDotNet/Documents/Document.cs index d7ed357..4369666 100644 --- a/source/VMelnalksnis.PaperlessDotNet/Documents/Document.cs +++ b/source/VMelnalksnis.PaperlessDotNet/Documents/Document.cs @@ -32,14 +32,14 @@ public sealed class Document [JsonPropertyName("original_file_name")] public string OriginalFileName { get; set; } = null!; - /// Gets or sets the instant at which the document was added to paperless. - public Instant Added { get; set; } + /// Gets or sets the datetime when the document was added to paperless. + public OffsetDateTime Added { get; set; } - /// Gets or sets the instant at which the document was last modified at. - public Instant Modified { get; set; } + /// Gets or sets the datetime when the document was last modified at. + public OffsetDateTime Modified { get; set; } - /// Gets or sets the instant at which the document was created at. - public Instant Created { get; set; } + /// Gets or sets the datetime when the document was created at. + public OffsetDateTime Created { get; set; } /// Gets or sets ids of the tags assigned to the document. [JsonPropertyName("tags")]