aboutsummaryrefslogtreecommitdiffstats
path: root/docs/book/src/chapter_1.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/book/src/chapter_1.md')
-rw-r--r--docs/book/src/chapter_1.md47
1 files changed, 46 insertions, 1 deletions
diff --git a/docs/book/src/chapter_1.md b/docs/book/src/chapter_1.md
index b743fda..b638874 100644
--- a/docs/book/src/chapter_1.md
+++ b/docs/book/src/chapter_1.md
@@ -1 +1,46 @@
-# Chapter 1
+# Entities
+
+```mermaid
+erDiagram
+ Account ||--|| Profile : "has"
+ Account ||--o{ Session : "creates"
+ Profile ||--o{ Follow : "follows"
+ Profile ||--o{ Follow : "is followed by"
+ Profile ||--o{ Like : "likes"
+ Profile {
+ string ap_id PK
+ string username
+ string description
+ string inbox
+ string outbox
+ enum type
+ string picture
+ string public_key
+ string private_key
+ timestamp created_at
+ timestamp last_refreshed_at
+ }
+ Account {
+ string ap_id FK
+ string oauth_provider_id PK
+ string oauth_provider_user_id PK
+ string email
+ }
+ Session {
+ string id PK
+ timestamp expires_at
+ string ap_id FK
+ }
+ Follow {
+ string follower_ap_id
+ string following_ap_id
+ timestamp created_at
+ }
+ Like {
+ string ap_id PK
+ string object_id PK
+ timestamp created_at
+ }
+```
+
+Profile.type is an enum supporting the ActivityPub actor type [values](https://www.w3.org/TR/activitystreams-vocabulary/#actor-types)