chore(project) rename main directory
This commit is contained in:
19
lib/WetSock/Models/Room.js
Normal file
19
lib/WetSock/Models/Room.js
Normal file
@@ -0,0 +1,19 @@
|
||||
export default class Room {
|
||||
constructor(data) {
|
||||
this.id = data.id;
|
||||
this.name = data.name;
|
||||
this.users = new Set();
|
||||
}
|
||||
|
||||
addUser(userId) {
|
||||
this.users.add(userId);
|
||||
}
|
||||
|
||||
removeUser(userId) {
|
||||
this.users.delete(userId);
|
||||
}
|
||||
|
||||
getUsers() {
|
||||
return Array.from(this.users);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user