1234567891011121314151617181920 |
- const mongoose = require('mongoose');
-
- //const Schema = mongoose.Schema,
- //ObjectId = Schema.ObjectId;
-
- 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 },
- message: { type: String, required: true },
- user: { type: String, required: true },
- tag: {type: [String] },
- });
-
- module.exports = mongoose.model('Message', MessageSchema);
|