2011-08-03 13:09:19 +02:00
|
|
|
# Database structure
|
|
|
|
|
2012-08-07 20:19:37 +02:00
|
|
|
## Keys and their values
|
|
|
|
|
2012-09-17 23:03:56 +02:00
|
|
|
### groups
|
|
|
|
A list of all existing groups (a JSON object with groupIDs as keys and `1` as values).
|
|
|
|
|
2011-08-03 13:09:19 +02:00
|
|
|
### pad:$PADID
|
2017-03-12 03:36:37 +01:00
|
|
|
Contains all information about pads
|
2011-08-03 13:09:19 +02:00
|
|
|
|
|
|
|
* **atext** - the latest attributed text
|
|
|
|
* **pool** - the attribute pool
|
|
|
|
* **head** - the number of the latest revision
|
|
|
|
* **chatHead** - the number of the latest chat entry
|
|
|
|
* **public** - flag that disables security for this pad
|
2018-11-05 22:45:00 +01:00
|
|
|
* **passwordHash** - string that contains a salted sha512 sum of this pad's password
|
2011-08-03 13:09:19 +02:00
|
|
|
|
|
|
|
### pad:$PADID:revs:$REVNUM
|
|
|
|
Saves a revision $REVNUM of pad $PADID
|
|
|
|
|
|
|
|
* **meta**
|
|
|
|
* **author** - the autorID of this revision
|
|
|
|
* **timestamp** - the timestamp of when this revision was created
|
|
|
|
* **changeset** - the changeset of this revision
|
|
|
|
|
|
|
|
### pad:$PADID:chat:$CHATNUM
|
2017-03-12 03:36:37 +01:00
|
|
|
Saves a chat entry with num $CHATNUM of pad $PADID
|
2011-08-03 13:09:19 +02:00
|
|
|
|
|
|
|
* **text** - the text of this chat entry
|
2017-03-12 03:36:37 +01:00
|
|
|
* **userId** - the authorID of this chat entry
|
2011-08-03 13:09:19 +02:00
|
|
|
* **time** - the timestamp of this chat entry
|
|
|
|
|
|
|
|
### pad2readonly:$PADID
|
|
|
|
Translates a padID to a readonlyID
|
|
|
|
### readonly2pad:$READONLYID
|
|
|
|
Translates a readonlyID to a padID
|
|
|
|
### token2author:$TOKENID
|
|
|
|
Translates a token to an authorID
|
|
|
|
### globalAuthor:$AUTHORID
|
|
|
|
Information about an author
|
|
|
|
|
|
|
|
* **name** - the name of this author as shown in the pad
|
|
|
|
* **colorID** - the colorID of this author as shown in the pad
|
|
|
|
|
|
|
|
### mapper2group:$MAPPER
|
2017-03-12 03:36:37 +01:00
|
|
|
Maps an external application identifier to an internal group
|
2011-08-03 13:09:19 +02:00
|
|
|
### mapper2author:$MAPPER
|
2017-03-12 03:36:37 +01:00
|
|
|
Maps an external application identifier to an internal author
|
2011-08-03 13:09:19 +02:00
|
|
|
### group:$GROUPID
|
|
|
|
a group of pads
|
|
|
|
|
2011-08-08 18:33:25 +02:00
|
|
|
* **pads** - object with pad names in it, values are 1
|
2011-08-03 13:09:19 +02:00
|
|
|
### session:$SESSIONID
|
|
|
|
a session between an author and a group
|
|
|
|
|
|
|
|
* **groupID** - the groupID the session belongs too
|
|
|
|
* **authorID** - the authorID the session belongs too
|
|
|
|
* **validUntil** - the timestamp until this session is valid
|
|
|
|
|
|
|
|
### author2sessions:$AUTHORID
|
|
|
|
saves the sessions of an author
|
|
|
|
|
2011-08-09 21:14:32 +02:00
|
|
|
* **sessionsIDs** - object with sessionIDs in it, values are 1
|
2011-08-03 13:09:19 +02:00
|
|
|
|
|
|
|
### group2sessions:$GROUPID
|
|
|
|
|
2011-08-09 21:14:32 +02:00
|
|
|
* **sessionsIDs** - object with sessionIDs in it, values are 1
|