Skip to content

Instantly share code, notes, and snippets.

@azhang
Forked from anonymous/gist:5266190
Last active December 15, 2015 15:08
Show Gist options
  • Save azhang/5278983 to your computer and use it in GitHub Desktop.
Save azhang/5278983 to your computer and use it in GitHub Desktop.
// http://docs.mongodb.org/manual/tutorial/model-tree-structures-with-ancestors-array/
{
"_id" : id,
"createdAt" : created_date,
"modifiedAt" : modified_date,
"accessedAt" : accessed_date,
"name" : name,
"description" : description,
"owner": owner._id,
"assignedTo" : user._id,
"following" : [
user1._id,
user2._id,
user3._id
],
"due" : due_date,
"file" : file_url or gridfs id, // includes pictures
"related" : [
// array of ids for related (but not immediately related) tasks/projects
],
"ancestors" : [
// array of ancestors ids
],
"parent" : id
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment