Notes:
- Assumes CouchDB compatible database
- Arrays are indicated by []
- All Doctypes start with pb to avoid naming collisions but should otherwise make sense.
- {i18n} - indicates an object with the text in an object with i18n keys.
All docs should have these fields
name |
Type |
notes |
id |
String |
probably from Couch |
dateCreated |
Date |
|
dateModified |
Date |
|
createdBy |
User |
|
modifiedBy |
User |
|
Site
name |
Type |
notes |
title |
String |
The title of the site “Phonoblogical” used if empty |
url |
URL |
The url of the site |
tagline |
{i18} |
The tagline used in the site description (mostly google). |
_user extensions
name |
Type |
notes |
audienceLevel |
String |
‘all’, ‘member’, ‘patron’, ‘none’ |
email |
String.email |
email address of user |
All ‘targetable’
Targetable are those that can have a url, not used internally by the app
name |
Type |
notes |
shortID |
String |
Something short for URL - see snowflake |
status |
String |
“draft”, “published”, “removed”, “review”, “submitted” |
signature |
String |
Future: Allow for signing content. See https://wiki.apache.org/couchdb/SignedDocuments |
May want to consider header items. See: https://gist.github.com/kevinSuttle/1997924
User profile:
These are separate from the actual user table that will not be syncable.
name |
Type |
notes |
doctype |
“pbprofile” |
|
userID |
String |
From the ? need to figure out |
handle |
String |
|
real_name |
String |
optional: real name |
Group:
name |
Type |
notes |
doctype |
“pbgroup” |
|
name |
String |
|
users |
[User] |
|
Album:
name |
Type |
notes |
doctype |
“pbalbum” |
|
title |
String |
|
dateReleased |
Date |
|
information |
{i18n} |
|
artist |
Artist |
|
tracks |
[Track] |
|
urls |
[URL] |
|
tags |
[String] |
|
reviews |
[Review] |
|
audience |
String |
‘all’, ‘member’, ‘patron’, ‘none’ |
Track:
name |
Type |
notes |
doctype |
“pbtrack” |
|
title |
String |
|
artist |
Artist |
|
album |
Album |
|
dateReleased |
Date |
|
information |
{i18n} |
|
tags |
[String] |
|
genre |
[String] |
|
lyrics |
[String] |
|
lyricsURL |
URL |
|
BPM |
Int |
|
urls |
[URL] |
|
videos |
[URL] |
|
reviews |
[Review] |
|
audience |
String |
‘all’, ‘member’, ‘patron’, ‘none’ |
Artist:
name |
Type |
notes |
doctype |
“pbartist” |
|
name: |
String |
|
information: |
{i18n} |
|
tracks: |
[Track] |
|
albums: |
[Album] |
|
urls: |
[URL] |
|
reviews: |
[Review] |
|
audience |
String |
‘all’, ‘member’, ‘patron’, ‘none’ |
Video:
name |
Type |
notes |
doctype |
“pbvideo” |
|
url: |
[URL] |
|
reviews: |
[Review] |
|
audience |
String |
‘all’, ‘member’, ‘patron’, ‘none’ |
Blog Post:
name |
Type |
notes |
doctype |
“pbblog” |
|
title |
String |
|
text |
String |
|
stub |
String |
|
tags |
[String] |
|
language |
String |
|
audience |
String |
‘all’, ‘member’, ‘patron’, ‘none’ |
Review:
name |
Type |
notes |
doctype |
“pbreview” |
|
reviewText: |
{i18n} |
|
ratings: |
[Rating] |
|
weApprove: |
bool |
|
audience |
String |
‘all’, ‘member’, ‘patron’, ‘none’ |
Rating:
name |
Type |
notes |
doctype |
“pbrating” |
|
ratingType: |
RatingType |
|
ratingText: |
{i18n} |
|
rating: |
Number |
|
audience |
String |
‘all’, ‘member’, ‘patron’, ‘none’ |
Rating type:
Note: Not a targettable type
name |
Type |
notes |
doctype |
“pbratingtype” |
|
type |
{i18n} |
|
Page
name |
Type |
notes |
doctype |
“pbpage” |
|
text |
{i18n} |
|
audience |
String |
‘all’, ‘member’, ‘patron’, ‘none’ |