From 8c21d0db04c3b1b77692eac30fd5e895464c89cf Mon Sep 17 00:00:00 2001 From: r-ca Date: Sat, 16 Dec 2023 13:41:12 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nem/lacerta/model/document/DocumentMeta.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/model/src/main/java/one/nem/lacerta/model/document/DocumentMeta.java b/model/src/main/java/one/nem/lacerta/model/document/DocumentMeta.java index 5d87f692..11411c49 100644 --- a/model/src/main/java/one/nem/lacerta/model/document/DocumentMeta.java +++ b/model/src/main/java/one/nem/lacerta/model/document/DocumentMeta.java @@ -149,4 +149,17 @@ public class DocumentMeta { this.tags = tags; } + /** + * updatedAtを現在時刻に設定する + */ + public void setUpdatedAtNow() { + this.updatedAt = new Date(); + } + + /** + * createdAtを現在時刻に設定する + */ + public void setCreatedAtNow() { + this.createdAt = new Date(); + } }