From 4d9547952e5b4b6b664e3dec08133c0db44f24c9 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Mon, 3 Mar 2025 00:03:38 +0100 Subject: [PATCH] Cleanup history in mermaid schema --- api/README.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/api/README.md b/api/README.md index d03dd8f1..df7a1dcf 100644 --- a/api/README.md +++ b/api/README.md @@ -98,22 +98,31 @@ erDiagram seasons ||--o{ entries : has shows ||--|{ seasons : has + users { + guid id PK + } + watched_shows { guid show_id PK, FK guid user_id PK, FK - status status "completed|watching|droped|planned" + status status "completed|watching|dropped|planned" uint seen_entry_count "NN" + guid next_entry FK } shows ||--|{ watched_shows : has + users ||--|{ watched_shows : has + watched_shows ||--|o entries : next_entry - watched_entries { - guid entry_id PK, FK - guid user_id PK, FK + history { + int id PK + guid entry_id FK + guid user_id FK uint time "in seconds, null of finished" uint progress "NN, from 0 to 100" datetime played_date } - entries ||--|{ watched_entries : has + entries ||--|{ history : part_of + users ||--|{ history : has roles { guid show_id PK, FK