Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // app.js
- Mongoose = require('mongoose');
- Schema = Mongoose.Schema;
- ObjectID = Schema.ObjectId;
- // Booth.js
- Users = new Schema({
- type: ObjectID
- , ref: 'UserModel'
- });
- Slots = new Schema({
- Name: String
- ,Users: [Users]
- });
- BoothSchema = new Schema({
- Name: String,
- MaxUsers: Number,
- Slots: [Slots]
- });
- BoothModel = Mongoose.model('BoothModel', BoothSchema);
Add Comment
Please, Sign In to add comment