travel comments system added

This commit is contained in:
nau
2016-09-05 20:28:14 +02:00
parent 8e98c356a4
commit cb3d7eabba
4 changed files with 56 additions and 6 deletions

12
models/commentModel.js Normal file
View File

@@ -0,0 +1,12 @@
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var commentSchema = new Schema({
travelId: { type: String },
commentUserId: { type: String },
commentUsername: { type: String },
comment: { type: String }
});
module.exports = mongoose.model('commentModel', commentSchema);

View File

@@ -6,8 +6,7 @@ var joinSchema = new Schema({
travelId: { type: String },
joinedUserId: { type: String },
joinedUsername: { type: String },
acceptedUserId: { type: String },
comment: { type: String }
acceptedUserId: { type: String }
});
module.exports = mongoose.model('joinModel', joinSchema);