var mongoose = require('mongoose'); var Schema = mongoose.Schema; var FeedbackMessageSchema = new Schema( { category: {type: String, required: true, maxLength: 20}, name: {type: String, required: false, maxLength: 100}, email: {type: String, required: false, maxLength: 100}, created: { type: Date, default: Date.now(), immutable: true }, subject: {type: String, required: false, maxLength: 100}, message: {type: String, required: false}, topic: {type: String, required: false, maxLength: 100}, game: {type: String, required: false, maxLength: 100}, platform: {type: String, required: false, maxLength: 100}, game_version: {type: String, required: false, maxLength: 100}, } ); //Export model module.exports = mongoose.model('FeedbackMessage', FeedbackMessageSchema);