mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 07:53:15 +00:00
一部のコンストラクタでデータを生成できていなかった
This commit is contained in:
parent
93971a097a
commit
33dd27bb3d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user