Skip to content
Pranay Dubey edited this page Aug 3, 2015 · 3 revisions

The database has following models:

Person

{
  name : {
    first : string, 
    last : string
  },
  emails : [{
     address : email_id,
     primary : boolean
  }],
  dob : {
     year : YYYY,
     month : MM,
     date : DD
  },
  groups : [],
  password : encrypted_string,
  username : primary_email 
}

Personal Message

{ 
  from : _id,
  to : _id,
  content : String,
  created : timeStamp, (created on the front-end)
} 

Group

{ 
  admins : [_id],
  users : [], 
  private : Boolean,
  creator: _id,
  name : String,
  about : String,
  created : timeStamp,
  updated : timeStamp
}

Group Message

{ 
  from : _id,
  content : String,
  created : timeStamp,
  group : _id 
}

Clone this wiki locally