From 33dd27bb3d8f2642aaa48009572ea856f6a7be5b Mon Sep 17 00:00:00 2001 From: r-ca Date: Mon, 18 Dec 2023 00:08:27 +0900 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E9=83=A8=E3=81=AE=E3=82=B3=E3=83=B3?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=83=A9=E3=82=AF=E3=82=BF=E3=81=A7=E3=83=87?= =?UTF-8?q?=E3=83=BC=E3=82=BF=E3=82=92=E7=94=9F=E6=88=90=E3=81=A7=E3=81=8D?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/one/nem/lacerta/model/document/DocumentMeta.java | 8 ++++++++ 1 file changed, 8 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 aa2bcb97..c191fcde 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 @@ -58,11 +58,19 @@ public class DocumentMeta { public DocumentMeta(String id, String title) { // Without tags, updatedAt, createdAt this.id = id; this.title = title; + // 現在時刻を設定 + this.updatedAt = new Date(); + this.createdAt = new Date(); + this.tags = new ArrayList<>(); } public DocumentMeta(String title) { // title only this.id = UUID.randomUUID().toString(); // 新規作成時想定なのでコンストラクタで生成してしまう(使う人が楽なので) this.title = title; + // 現在時刻を設定 + this.updatedAt = new Date(); + this.createdAt = new Date(); + this.tags = new ArrayList<>(); } // Getter