2014-12-15 02:36:41 -05:00
|
|
|
var mongoose = require('mongoose'),
|
|
|
|
Schema = mongoose.Schema,
|
|
|
|
ObjectId = Schema.ObjectId;
|
|
|
|
|
|
|
|
var postSchema = new Schema({
|
|
|
|
title: { type: String },
|
|
|
|
preview: { type: String },
|
2015-04-06 03:28:20 -04:00
|
|
|
previewHtml: { type: String },
|
2014-12-15 02:36:41 -05:00
|
|
|
details: { type: String },
|
2015-04-06 03:28:20 -04:00
|
|
|
detailsHtml: { type: String },
|
2014-12-15 02:36:41 -05:00
|
|
|
image: { type: String },
|
|
|
|
gallery: [{ type: String }],
|
|
|
|
status: { type: String },
|
|
|
|
createdOn: { type: Date },
|
|
|
|
postedOn: { type: Date },
|
2015-04-06 03:28:20 -04:00
|
|
|
author: { type: ObjectId, ref: 'User' },
|
|
|
|
tags: [{ type: String }],
|
|
|
|
pages: [{ type: String }]
|
2014-12-15 02:36:41 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
var Post = module.exports = mongoose.model('Post', postSchema);
|