add mermaid code in setup
This commit is contained in:
@@ -17,6 +17,89 @@ Komplette Anleitung zur Einrichtung von Directus als Backend für die dgray Klei
|
||||
|
||||
---
|
||||
|
||||
## Datenmodell-Übersicht
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
USERS ||--o{ LISTINGS : creates
|
||||
USERS ||--o{ FAVORITES : has
|
||||
USERS ||--o{ CONVERSATIONS : participates
|
||||
USERS ||--o{ MESSAGES : sends
|
||||
USERS ||--o{ REPORTS : submits
|
||||
|
||||
LISTINGS ||--o{ LISTINGS_FILES : has
|
||||
LISTINGS ||--o{ FAVORITES : receives
|
||||
LISTINGS ||--o{ CONVERSATIONS : has
|
||||
LISTINGS }o--|| CATEGORIES : belongs_to
|
||||
LISTINGS }o--o| LOCATIONS : located_at
|
||||
|
||||
LISTINGS_FILES }o--|| DIRECTUS_FILES : references
|
||||
|
||||
CATEGORIES ||--o{ CATEGORIES : has_children
|
||||
CATEGORIES ||--o{ CATEGORIES_TRANSLATIONS : has
|
||||
|
||||
CONVERSATIONS ||--o{ MESSAGES : contains
|
||||
|
||||
LISTINGS {
|
||||
uuid id PK
|
||||
string status
|
||||
string title
|
||||
text description
|
||||
decimal price
|
||||
string currency
|
||||
string condition
|
||||
datetime expires_at
|
||||
string monero_address
|
||||
}
|
||||
|
||||
CATEGORIES {
|
||||
uuid id PK
|
||||
string name
|
||||
string slug
|
||||
string icon
|
||||
uuid parent FK
|
||||
}
|
||||
|
||||
CONVERSATIONS {
|
||||
uuid id PK
|
||||
uuid listing FK
|
||||
uuid buyer FK
|
||||
uuid seller FK
|
||||
string status
|
||||
}
|
||||
|
||||
MESSAGES {
|
||||
uuid id PK
|
||||
uuid conversation FK
|
||||
uuid sender FK
|
||||
text content
|
||||
datetime read_at
|
||||
}
|
||||
|
||||
FAVORITES {
|
||||
uuid id PK
|
||||
uuid user FK
|
||||
uuid listing FK
|
||||
}
|
||||
|
||||
REPORTS {
|
||||
uuid id PK
|
||||
uuid reporter FK
|
||||
uuid listing FK
|
||||
string reason
|
||||
string status
|
||||
}
|
||||
|
||||
LOCATIONS {
|
||||
uuid id PK
|
||||
string name
|
||||
string postal_code
|
||||
string country
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 1. Data Models (Collections)
|
||||
|
||||
### 1.1 listings (Anzeigen)
|
||||
|
||||
Reference in New Issue
Block a user