diff --git a/src/main/java/com/example/cosmos_serversb/entities/Group.java b/src/main/java/com/example/cosmos_serversb/entities/Group.java index 50e19c2..e5ecd27 100644 --- a/src/main/java/com/example/cosmos_serversb/entities/Group.java +++ b/src/main/java/com/example/cosmos_serversb/entities/Group.java @@ -3,12 +3,13 @@ import java.util.ArrayList; +import static com.example.cosmos_serversb.models.Users.*; + public class Group { private String gId, uri, name; - //private ArrayList members; + private ArrayList members; private ArrayList requests; - private Group(){ } @@ -17,7 +18,8 @@ setGid(gId); setUri(uri); setName(name); - //addMemberByUid(uId); + this.members.add(getUserById(uId)); + this.requests = null; } private void setGid(String gId){ @@ -36,7 +38,7 @@ return uri; } - public void setName(String name){ + private void setName(String name){ this.name = name; } @@ -60,8 +62,6 @@ //} /*リクエスト*/ -// - }