Skip to content

Instantly share code, notes, and snippets.

@meesont
Created April 2, 2019 20:53
Show Gist options
  • Save meesont/be84ceb5cd6847befbc05c807a9b8c19 to your computer and use it in GitHub Desktop.
Save meesont/be84ceb5cd6847befbc05c807a9b8c19 to your computer and use it in GitHub Desktop.
var eventsSchema = new mongoose.Schema({
name: String,
date: Date,
first: {
points: Number,
house: {
type: mongoose.Schema.Types.ObjectId,
ref: 'House'
}
},
second: {
points: Number,
house: {
type: mongoose.Schema.Types.ObjectId,
ref: 'House'
}
},
third: {
points: Number,
house: {
type: mongoose.Schema.Types.ObjectId,
ref: 'House'
}
},
fourth: {
points: Number,
house: {
type: mongoose.Schema.Types.ObjectId,
ref: 'House'
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment