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(); + } }