Initial Websockets, Rooms & Players done
This commit is contained in:
16
API/room.model.js
Normal file
16
API/room.model.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const mongoose = require('mongoose');
|
||||
const Schema = mongoose.Schema;
|
||||
|
||||
// Define collection and schema for Post
|
||||
let Room = new Schema({
|
||||
title: {
|
||||
type: String
|
||||
},
|
||||
members: {
|
||||
type: Array
|
||||
}
|
||||
}, {
|
||||
collection: 'rooms'
|
||||
});
|
||||
|
||||
module.exports = mongoose.model('Room', Room);
|
||||
Reference in New Issue
Block a user