Skip to content

Instantly share code, notes, and snippets.

@ivish
Last active December 20, 2015 15:11
Show Gist options
  • Save ivish/d80a503de774fb053ea5 to your computer and use it in GitHub Desktop.
Save ivish/d80a503de774fb053ea5 to your computer and use it in GitHub Desktop.
PostInfo & PostBody Schema
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
module.exports = new Schema({
htmlText: {
type: String,
required: true
},
});
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
module.exports = new Schema({
title: {
type: String,
required: true
},
subtitle: {
type: String
},
authorName: {
type: String,
required: true
},
authoringDate: {
type: Date,
default: Date.now
},
_bodyId: {
type: Schema.Types.ObjectId,
required: true
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment