Skip to content

Commit

Permalink
add planned erd
Browse files Browse the repository at this point in the history
  • Loading branch information
vorant94 committed Jan 3, 2025
1 parent 5735d71 commit 996ec48
Showing 1 changed file with 87 additions and 0 deletions.
87 changes: 87 additions & 0 deletions docs/erd.mmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
erDiagram
users {
string id PK
string resource_type
timestamp created_at
timestamp updated_at

string telegram_chat_id UK
}

user_titles {
string id PK
string resource_type
timestamp created_at
string created_by FK
timestamp updated_at

string user_id FK
string title_id FK
}

chains {
string id PK
string resource_type
timestamp created_at
timestamp updated_at

string name
}

sites {
string id PK
string resource_type
timestamp created_at
timestamp updated_at

string chain_id FK

string name
}

releases {
string id PK
string resource_type
timestamp created_at
timestamp updated_at

string chain_release_id
string chain_id FK
}

showtimes {
string id PK
string resource_type
timestamp created_at
timestamp updated_at

string site_id FK
string release_id FK

string site_link
timestamp starts_at
}

titles {
string id PK
string resource_type
timestamp created_at
string created_by FK
timestamp updated_at

string title_id FK
string imdb_id UK

string name
}

titles ||--o{ releases : "is released via"

users ||--o{ user_titles : "is subscribed to releases of"
titles ||--o{ user_titles : "notifies users about releases via"

chains ||--o{ sites : "owns"
chains ||--o{ releases : "produces"

sites ||--o{ showtimes : "has"
releases ||--o{ showtimes : "is shown via"

0 comments on commit 996ec48

Please sign in to comment.