41 lines
636 B
Markdown
41 lines
636 B
Markdown
## Database Schema
|
|
|
|
```mermaid
|
|
erDiagram
|
|
user {
|
|
string name PK
|
|
}
|
|
|
|
game {
|
|
serial game_id PK
|
|
int score
|
|
time playtime
|
|
date date
|
|
string username FK
|
|
}
|
|
|
|
user ||--O{ game : "played"
|
|
|
|
user_data {
|
|
string username PK
|
|
int highscore
|
|
int total_score
|
|
int total_playtime
|
|
int average_score
|
|
int games_played
|
|
}
|
|
|
|
lb_highscore {
|
|
int rank
|
|
string username
|
|
int highscore
|
|
}
|
|
|
|
lb_total_playtime {
|
|
int rank
|
|
string username
|
|
time total_playtime
|
|
}
|
|
```
|
|
|
|
## API Endpoints
|