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 c38b95a..da46412 100644 --- a/src/main/java/com/example/cosmos_serversb/entities/Group.java +++ b/src/main/java/com/example/cosmos_serversb/entities/Group.java @@ -3,6 +3,8 @@ import java.util.ArrayList; +import static com.example.cosmos_serversb.models.Users.*; + public class Group { private String gId, uri, name; private ArrayList members; @@ -13,12 +15,24 @@ } + //これはテスト用です。 + public Group(String gId, String uri, String name, String uId){ + this.gId = gId; + this.uri = uri; + this.name = name; + this.members.add(getUserById(uId)); + this.requests = null; + } + + /* public Group(String gId, String uri, String name, String uId){ setGid(gId); setUri(uri); setName(name); - //addMemberByUid(uId); + this.members.add(getUserById(uId)); + this.requests = null; } + */ private void setGid(String gId){ this.gId = gId;