diff --git a/src/main/java/com/ntlab/irisserver/entities/RoomJson.java b/src/main/java/com/ntlab/irisserver/entities/RoomJson.java new file mode 100644 index 0000000..f971038 --- /dev/null +++ b/src/main/java/com/ntlab/irisserver/entities/RoomJson.java @@ -0,0 +1,39 @@ +package com.ntlab.irisserver.entities; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class RoomJson { + @JsonProperty("rid") + private String rid; + + @JsonProperty("state") + private int state; + + @JsonProperty("ownerName") + private String ownerName; + + @JsonProperty("members") + List members = new ArrayList<>(); + + //コンストラクター + public RoomJson(Room r){ + this.rid = r.rid; + this.ownerName = r.ownerName; + this.state = r.getState(); + this.members = r.getMembers(); + } + + //getter + public String getRid() {return this.rid;} + + public int getState() {return this.state;} + + public String getOwnerName() {return this.ownerName;} + + public List getMembers() {return this.members;} +}