var mongoose = require('mongoose');

var commentSchema = mongoose.Schema({
	text: String,
	author: String
});

module.exports = mongoose.model('Comment', commentSchema);

var mongoose = require('mongoose');

var commentSchema = mongoose.Schema({
	text: String,
	author: {
		id: {
			type: mongoose.Schema.Types.ObjectId,
			ref: 'User'
		},
		username: String
	}
});

module.exports = mongoose.model('Comment', commentSchema);

Add relations between Commets and Users.
Add relations between Commets and Users.
