+ bin, db, insagram, feed on main page

This commit is contained in:
tmshv committed 2014-11-23 21:57:34 +03:00
1 parent 09412f288f
commit 0d6cf42c7f
18 files changed
+449 -17

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
/**
* Created by tmshv on 22/11/14.
*/
var mongoose = require("mongoose");
var Schema = mongoose.Schema;
var ObjectId = Schema.Types.ObjectId;
var schema = new Schema({
id: {type: String, required: true, index: {unique: true}},
author: {type: String, default: []},
type: {type: String, enum: ["post", "instagram"]},
publishDate: Date,
body: String,
data: Object
}
);
var Post = mongoose.model("Post", schema, "posts");
module.exports = Post;