Data Structure
This system uses DynamoDB as a data store.
Table Definition
The PK and SK is just set as "PK" as "SK".
Global Secondary Index (GSI)
Name: UserEmail
- PK: EMail
Projection: Key Only
Local Secondary Index (LSI)
Name: TravelDate
- PK: Travel ID
- StartDate: start date of the travel
Projection: All
User
The user's definition is the following.
- PK: User ID
- SK: "USER"
User Attributes
Key | Value | Type |
---|---|---|
PK | User id | String |
SK | "USER"1 | String |
Name | username | String |
e-mail address | String | |
Partners | a list of User IDs | List |
Travel
Travel
Key | Value | Type |
---|---|---|
PK | Travel id | String |
SK | "Travel"1 | String |
Name | name of this travel | String |
StartDate | Start date (ISO8601) | String |
EndDate | end date (ISO8601). Can be null | String |
Travelers | a list of User IDs | List |
InvolvedUsers | a list of User IDs | List |
Travel - User
To bind the user and the travel.
Key | Value | Type |
---|---|---|
PK | User ID | String |
SK | Travels#(Travel ID2) | String |
ToDo
The ID is an auto-increment number. Thus, there are ID manage tables.
-
PK: Travel ID
-
SK: Composite ID
TODO List Group
Key | Value | Type |
---|---|---|
PK | Travel ID | String |
SK | ToDoListGroup#(todo list ID2) | String |
TodoListGroupId | The todo group ID | Number |
Name | todo list name | String |
TZ | timezone offset | Number |
ToDo (Each)
Key | Value | Type |
---|---|---|
PK | Travel ID | String |
SK | ToDoList#(todo list ID2)#ToDo#(todo ID2) | String |
TodoId | todo list group ID | Number |
Summary | summary | String |
Description | description. Can be null | String |
DueDate | can be null. UTC. Timestamp | Number |
Done | done or not | boolean |
ToDo ID
ToDo List Group ID Counter
Key | Value | Type |
---|---|---|
PK | Travel ID | String |
SK | "ToDoListCounter" | String |
Count | latest ID | Number |
ToDo ID Counter
Key | Value | Type |
---|---|---|
PK | Travel ID | String |
SK | ToDoCounter#(todo list id) | String |
Count | latest ID | Number |