-
Notifications
You must be signed in to change notification settings - Fork 0
Database schema
Mason Wesolek edited this page Apr 28, 2020
·
8 revisions
personalBoards/<userid>/pboards/<boardid>
- articles: array of reference objects to local articles
- boardName: str
- followers: array of userids
- isPrivate: bool
- queue: array of references to articles (MIGHT HAVE WRONG DATA RIGHT NOW)
- timestamp: timestamp (when created. note: this does not exist in old boards, but new boards will have it, except those created by chrome extension)
- imageURL: str
- lastSeenTime: timestamp (not in master yet)
Tentative:
- (none)
localArticles/users/<userid>/<articleid>
- name: str
- notes: str
- read: bool
- starred: bool
- time: timestamp (this is creation time)
- url: str (but url)
- user_reports: array of
- user: ref to user at users/<userid>/
- report: str
- lastSeenTime: timestamp (not in master yet)
Tentative:
- (none)
users/<userid>/
- name: str (Might be empty if signed in with email and password)
- email: str
- blocked_users: array of references to /users/<userid> (MIGHT NOT BE PRESENT IN ALL RIGHT NOW, GENERATED WHEN BLOCKING SOMEONE)
- articles_raised_eyebrow: array of references to community articles /communityArticles/<community_article_id>
- followers: array of userids (IMPORTANT: NOT REFERENCES, JUST STORES IDS)
- following: array of userids (IMPORTANT: NOT REFERENCES, JUST STORES IDS)
- pboardFollowing: array of personal board ids (IMPORTANT: NOT REFERENCES, JUST STORES IDS)
- photoUrl: str (but url)
- platform: str (Google/FB/etc.)
sub collection
- activities:
- user: ref to user related to this activity (for eg. new personal board added by this user)
- message: str (the content of the recent activity)
- link: str (relative url from app hashrouting root. So eg community-boards (site.com/#/community-boards). This is optional. This will be opened when user clicks on the activity)
- timestamp: date (when is this activity created)
Note: might change the ids fields to store references instead, but can currently code based on how they are stored currently.
communityArticles/<article id>
- name: str
- eyebrow: number (integer "like" count) (ONLY EXISTS IN SOME, USE
users_eyebrowsINSTEAD WHICH IS AN ARRAY) - communities: array of references to community boards at /communityBoards/<community board id> (note: this might be empty for some articles, but it will still be defined)
- notes: str (notes for this article)
- time: timestamp (time of creation of this article. NOT THE LAST UPDATED TIME)
- url: str (but url)
- user: ref to user at /users/<userid>
- user_reports: (same as in local articles)
- users_eyebrows: array of userids (IMPORTANT: NOT REFERENCES, JUST STORES IDS)
Note: might change only id fields to store refs Note: users_eyebrows is correct name, NOT user_eyebrows
communityArticles/<article id>/comments/<comment id>
- comment: str
- edited: bool of if the comment has been edited since first posted
- name: str of the name of the user that put the comment
- photoURL: str of the url for the avatar in the comment
- timestamp: Date object of when the comment was posted
- userid: str of the uid that posted the comment
communityBoards/<boardid>
- articles: arr of refs to community articles
- isPrivate: bool (IMPORTANT: DON'T KNOW WHY THIS FIELD IS THERE, DON'T USE IT)
- name: str