Skip to content
alvarosaco edited this page Dec 25, 2014 · 4 revisions

Compart.io Database

Countries

  • _id
  • name (string)

Cities

  • _id
  • country (_id)
  • name (required, string)
  • slug (string)
  • postalCode (string)
  • isActive (boolean, default: false)
  • created (date)
  • updated (date)

Users

  • _id
  • firstName (string)
  • lastName (string)
  • screen_name (firstName + lastName)
  • username (required, unique)
  • email (required, unique)
  • sign_up_stamp (date, default: date.now)
  • last_sign_in_stamp (date, default: date.now)
  • password_hash (string)
  • karma (number, default: 0)
  • street (string)
  • city (_id)

Compartios (objects)

  • _id
  • title (string)
  • description (string)
  • category (_id)
  • use (used,new,broken)
  • giverUser (_id) - user who gives
  • receiverUser (_id) - user who receives
  • interestedUsers (_id) - array of users who make "like" action
  • status (published|canceled|finished)
  • isDonation (boolean)
  • url_images (string) - array of relative urls
  • created (date)
  • location (string) - [lat,lng])

Categories

  • _id
  • title (string)
  • description (string)
  • url_image (string) - relative url

Messages

  • _id
  • user (_id)
  • compartio (_id)
  • content (string)
  • created (date)
  • url_image (string) - relative url
Clone this wiki locally