From bc19dd22d868d03ff1a80db01bce5106c0ecd0e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Tue, 16 Jan 2024 12:35:19 +0900 Subject: [PATCH] =?UTF-8?q?DocumentMeta=E3=81=AB=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=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/model/document/DocumentMeta.java | 11 +++++++++++ 1 file changed, 11 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 038b625e..2fc0f4bc 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 @@ -48,6 +48,17 @@ public class DocumentMeta { // TODO-rca: JavaDoc対応 public DocumentMeta() { } + public DocumentMeta(String title) { + this.id = UUID.randomUUID().toString(); + this.title = title; + this.tags = new ArrayList<>(); + this.author = ""; // TODO-rca: 作者のデフォルト値を設定できるようにする + this.defaultBranch = "main"; // TODO-rca: デフォルトブランチのデフォルト値を設定できるようにする + this.path = new PublicPath().getRoot(); + this.updatedAt = new Date(); + this.createdAt = new Date(); + } + public DocumentMeta(String title, List tags, String author, String defaultBranch) { this.id = UUID.randomUUID().toString(); this.title = title;