Last active
December 20, 2015 15:11
-
-
Save ivish/d80a503de774fb053ea5 to your computer and use it in GitHub Desktop.
PostInfo & PostBody Schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongoose = require('mongoose'), | |
Schema = mongoose.Schema; | |
module.exports = new Schema({ | |
htmlText: { | |
type: String, | |
required: true | |
}, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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