Merge remote-tracking branch 'origin/developer' into developer
This commit is contained in:
commit
9bf9f5faec
@ -4,17 +4,11 @@ const mongoose = require('mongoose');
|
|||||||
//ObjectId = Schema.ObjectId;
|
//ObjectId = Schema.ObjectId;
|
||||||
|
|
||||||
const MessageSchema = mongoose.Schema({
|
const MessageSchema = mongoose.Schema({
|
||||||
//_id: ObjectId,
|
|
||||||
/*id: {
|
|
||||||
type: String,
|
|
||||||
getter: function(val) { return this._id.toString(); },
|
|
||||||
unique: true
|
|
||||||
},*/
|
|
||||||
//id: {type: String, required: true},
|
|
||||||
subject: { type: String, required: true },
|
subject: { type: String, required: true },
|
||||||
message: { type: String, required: true },
|
message: { type: String, required: true },
|
||||||
user: { type: String, required: true },
|
user: { type: String, required: true },
|
||||||
tag: {type: String },
|
tag: [{type: String, index: true }],
|
||||||
|
//createtime: { type: Date, default: Date.now },
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = mongoose.model('Message', MessageSchema);
|
module.exports = mongoose.model('Message', MessageSchema);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user