Skip to content

Database Schema

Joshua Storm Becker edited this page May 14, 2017 · 39 revisions

The current database schema.

User.profile

Client-side can only access the specific user.profile of a logged in user.

  • Email (String)
  • Access Token
  • Refresh Token
  • Timezone (Int) - recalculated from where?
  • Calendar Busy Times (Array)
    • Start time (Float)
    • End time (Float)
  • Calendar Available Times (Array)
    • Start time (Float)
    • End time (Float)
  • Additional Busy Times (Array)
    • Start time (Float) Stored in unix time
    • End time (Float) Stored in unix time
  • meetRange (Object) - Indicates the earliest and latest a user wants to meet
    • earliest (TimeString?) - defaults 9am
    • latest (TimeString?) - Defaults 10pm
  • Calendars1 (Dictionary {id: {title: (String), considered (bool)})
    • id (String)
    • title (String)
    • considered (Boolean) - Whether or not this calendar should be considered busy or not
  • meetingInvitesSent - array of Meeting ID strings from Mongo
  • meetingInvitesReceived - array of Meeting ID strings from Mongo
  • finalizedMeetings (Array) - Meeting ID strings from Mongo

1This is the list of calendars that the user wants considered. I.E. "Princeton Powerlifting" "Princeton Ballet." Need this info to recreate calendar for Jimmy when Cindy logs in.

Temp

Client-side cannot access.

  • Email (String, regex check)
  • meetingInvitesReceived - array of Meeting ID strings from Mongo

Meetings

Client-side can only access Meetings in which the current logged in user is a participant of.

  • ID - generated when you insert into Mongo
  • title (string) - Purpose of meeting
  • duration (float) - in seconds to interface well with UNIX time
  • windowStartDate (Date)
  • windowEndDate (Date)
  • isFinalized (Boolean) - False until the selector has chosen a final time for the meeting to take place (and every other detail is "final"
  • readyToFinalize (Boolean) - True when enough people have accepted the invite (100% acceptance for now), so the selector needs to pick the final time now
  • addedToGCal (Boolean) - True when a user has hit to push the event to GCal
  • participants - array
    • ID - string (null if they aren't a user?)
    • email - string
    • accepted - boolean
      • true iff user has accepted email invite and uploaded calendar
      • true for meeting creator
    • selector - boolean
      • true iff this participant is the one who selects the best meeting time
    • creator - boolean
      • did this person create the meeting
  • availableTimes - array - filtered down as new people add their calendars
    • startTime - float - JS Date object
    • endTime - float - JS Date object
  • durationLongAvailableTimes - array - list of possible meeting times that are the correct duration
    • startTime - float - JS Date object
    • endTime - float - JS Date object
  • selectedBlock - final meeting time that was chosen
    • startTime (JS Date object)
    • endTime (JS Date object)
  • comment - associate this to a comment object
Clone this wiki locally