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