diff --git a/src/main/java/com/example/cosmos_serversb/entities/User.java b/src/main/java/com/example/cosmos_serversb/entities/User.java index d2dd33f..57de93e 100644 --- a/src/main/java/com/example/cosmos_serversb/entities/User.java +++ b/src/main/java/com/example/cosmos_serversb/entities/User.java @@ -4,9 +4,29 @@ import java.util.Set; public class User { + /** + * USER用のクラス + * + * @param uId string //LONGに変更 + * @param uri String + * @param name String + * @param iconUri String iconの保存先 + * @param login Boolean トークンが存在するか否か + * @param groups Set 所属するグループ + * @param tokens String userが持トークン一覧 + * + * TODO: Tokenのデータベース接続 + * TODO: tokenの持ち方要検討 + */ + public String uId, uri, name, iconUri; public boolean login = true; public Set groups = new HashSet<>();//HashSetでいいのかな? + //仕様ではStringを返すため + //public Set tokens = new HashSet<>(); + //public Set tokens = new HashSet<>(); + public String token; + private String dummyToken = "a9965652-c2ec-4a0d-a78a-b457e8b2deca"; public User() { @@ -16,6 +36,8 @@ setUri(uri); setName(name); setIconUri(iconUri); + setToken(this.dummyToken); + //addToken(this.dummyToken); this.login = true; } @@ -59,6 +81,27 @@ this.login = login; } + public void setToken(String token) { + this.token = token; + } + + public String getToken() { + return token; + } + + /* + * //仕様ではStringで返すため + * public Set getTokens(){ + * return tokens; + * } + * public void setTokens(Set tokens){ + * this.tokens=tokens; + * } + * public void addToken (String token){ + * tokens.add(token); + * } + */ + public Set getGroups() { return groups; }