diff --git a/src/main/java/org/ntlab/acanthus_server/entities/Account.java b/src/main/java/org/ntlab/acanthus_server/entities/Account.java index 1f2c7c8..53dbd1c 100644 --- a/src/main/java/org/ntlab/acanthus_server/entities/Account.java +++ b/src/main/java/org/ntlab/acanthus_server/entities/Account.java @@ -52,6 +52,8 @@ private String token; @JsonIgnore private String password; + @JsonIgnore + private boolean isDummy; //----------------------------------------------------------------- //コンストラクト @@ -60,6 +62,9 @@ this.name = name; this.email = email; this.password = password; + + // ダミー + createDummyAccount(); } //----------------------------------------------------------------- @@ -144,7 +149,7 @@ //----------------------------------------------------------------- // トークンを更新する 藤井 public void updateToken() { - this.token = UUID.randomUUID().toString(); + if (!isDummy) this.token = UUID.randomUUID().toString(); } //----------------------------------------------------------------- @@ -152,6 +157,17 @@ public boolean isMatchedPassword(String password) { return this.password.equals(password); } - //----------------------------------------------------------------- + //----------------------------------------------------------------- + //----------------------------------------------------------------- + // ダミー + private void createDummyAccount() { + this.isDummy = true; + this.uid = 1; + this.name = "dummy"; + this.email = "d@m.com"; + this.password = "nittalab"; + this.token = "abc"; + } + //----------------------------------------------------------------- }