Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tarun-porter committed Jan 25, 2024
1 parent 675210b commit 27f0b56
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions swift-activities/docs/DB.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# DB Schema

| User | | |
## User
| user_account | | |
|------|----|---|
|user_id| uuid| |
|created_at|timestamptz| default now() |
|updated_at|timestamptz| default now() |

|Activity| | |
## Activity
|activity| | |
|--------|----|---|
|activity_id | uuid | |
|name | string | optional |
Expand All @@ -17,7 +19,9 @@
|created_at|timestamptz| default now() |
|updated_at|timestamptz| default now() |

| ActivityGeolocationData | | |
## ActivityGeolocationData
Table to store geolocation data captured from device while performing `activity`
| activity_geolocation_data | | |
|-------|-----|---|
|geolocation_data_id | serial | |
|activity_id | uuid | |
Expand All @@ -34,7 +38,9 @@
}
```

| ActivityInsights | | |
## ActivityInsights
This stores the computed data for an activity.
| activity_insights | | |
|------|---|---|
|activity_insight_id | uuid | |
|activity_id | uuid | |
Expand All @@ -49,8 +55,3 @@
, average_speed: in m/s
, lowest_speed: in m/s}
```

|duratiom | int |
| average_speed | double |
| top_speed | double |
| lowest_speed | double |

0 comments on commit 27f0b56

Please sign in to comment.