-
Notifications
You must be signed in to change notification settings - Fork 6
/
gameModel.js
31 lines (27 loc) · 914 Bytes
/
gameModel.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
var mongoose = require('mongoose'),
Schema = mongoose.Schema,
ObjectId = Schema.ObjectId;
var GameSchema = new Schema({
title : String,
prompt : String,
gameData : {type: ObjectId, ref: 'GameData'},
judgingOrder : Array,
round : Number,
judge : {username: String, avatarURL: String, userGlobalId: String},
numberOfSub : Number,
players : Object,
previousRound : Object
});
module.exports = mongoose.model('Games', GameSchema);
// this is what player looks like
// userID: {
// hand: [String],
// score: Number,
// username: String,
// avatarURL: String,
// isJ: {type: Boolean, default: false},
// submitted: {type: Boolean, default: false},
// submission: {url: String, type: String, hashtag: String},
// userGlobalId: { type: ObjectId, ref: 'User' },
// continued: {type: Boolean, default: false}
// }