-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |