Skip to content
maxwang7 edited this page Jul 4, 2014 · 4 revisions

Model: Post

Description: This Model represents a blog post and its contained media.

Field: info, Sub-field: title, description, text, tags, location

info: Required
Type: Object
Description: Information about the post, including text to display.
Default: N/A

** title: Required
Type: String
Description: The title of the blog post.
Default: N/A

** description: Optional
Type: String
Description: A description about the blog post. Can be treated as a sub-header.
Default: N/A

** text: Required
Type: String
Description: The body of the blog post.
Default: N/A

** tags: Optional
Type: Array of Strings Description: tags to organize the blog posts.
Default: N/A

** location: Required
Type: String
Description: The name of the location where the blog post occurred.
Default: N/A

Field: timestamp

timestamp: Required
Type: Date
Description: The time at which the comment was made.
Default: Date.now()

Field: isProfile

isProfile: Required
Type: Boolean
Description: Indicates whether the Post is a profile. True if it is a profile, False if it isn't.
Default: N/A

Field: media, Sub-fields: audio, photo, video

media: Required
Type: Object
Description: Stores media references.
Default: N/A

** audio: Required
Type: Array of Object IDs
Description: Stores references to the Object IDs corresponding to audios in the blog post, organized in chronological order. Default: N/A

** photo: Required
Type: Array of Object IDs
Description: Stores references to the Object IDs corresponding to photos in the blog post, organized in chronological order.
Default: N/A

** video: Required Type: Array of Object IDs
Description: Stores references to Object IDs corresponding to videos in the blog post, organized in chronological order.
Default: N/A