Skip to content

DB models

Pankajashree edited this page Dec 17, 2017 · 3 revisions

1. Users collection

user: { _id: ObjectId, name: String, avatar: ??url??, bio: string, social_links:['github', 'twitter', 'fb'], website, stories: array of ObjectIds referencing stories collection, bookmarks: array of ObjectIds from stories collection,

}

Stories Collection

story: { _id: ObjectId, title: String, feature_img: ??url??, content: string, date: Date, author: ObjectId of user, tags: array of strings, upvotes: Number }

Clone this wiki locally