var mongoose = require('mongoose');

// SCHEMA SETUP:
var campgroundSchema = new mongoose.Schema({
    name: String,
    image: String,
    description: String,
    comments: [
    	{
    		type: mongoose.Schema.Types.ObjectId,
    		ref: 'Comment'
    	}
    ]
});

module.exports = mongoose.model('Campground', campgroundSchema);

var mongoose = require('mongoose');

// SCHEMA SETUP:
var campgroundSchema = new mongoose.Schema({
    name: String,
    image: String,
    description: String,
    author: {
    	id: {
    		type: mongoose.Schema.Types.ObjectId,
    		ref: 'User'
    	},
    	username: String
    },
    comments: [
    	{
    		type: mongoose.Schema.Types.ObjectId,
    		ref: 'Comment'
    	}
    ]
});

module.exports = mongoose.model('Campground', campgroundSchema);

Add relations between Campgrounds and User models.
Add relations between Campgrounds and User models.
