From 68212b93b0364cc71295bc9fe909b2d536a58326 Mon Sep 17 00:00:00 2001 From: ribardej Date: Thu, 18 Sep 2025 13:48:09 +0200 Subject: [PATCH] feat(design) created an ER diagram --- design.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/design.md b/design.md index 38f20b1..0da1efd 100644 --- a/design.md +++ b/design.md @@ -63,6 +63,41 @@ flowchart LR - Example records or schemas (link to files or include concise snippets). - Users, Transactions, Transaction_Categories, User_settings +```mermaid +erDiagram + USERS { + int user_id PK + string name + string email + } + + TRANSACTIONS { + int transaction_id PK + int user_id FK + int category_id FK + decimal amount + date transaction_date + } + + TRANSACTION_CATEGORIES { + int category_id PK + string name + string type + string color + } + + USER_SETTINGS { + int setting_id PK + int user_id FK + string setting_key + string setting_value + } + + USERS ||--o{ TRANSACTIONS : "makes" + USERS ||--o{ USER_SETTINGS : "has" + TRANSACTION_CATEGORIES ||--o{ TRANSACTIONS : "categorizes" +``` + ### 2.3 APIs (REST/gRPC/GraphQL) - Swagger