# Database Entity Relationship

{% @mermaid/diagram content="erDiagram
USERS ||--o{ RUNS : creates
RUNS ||--o{ TRANSCRIPTS : contains
RUNS ||--o{ REPORTS : generates
RUNS }o--|| SCENARIOS : uses
RUNS }o--|| MODELS : tests

```
USERS {
    uuid id PK
    string email
    string role
}
RUNS {
    uuid id PK
    uuid user_id FK
    string status
    jsonb config
    timestamp created_at
}
TRANSCRIPTS {
    uuid id PK
    uuid run_id FK
    jsonb messages
    jsonb scores
}
REPORTS {
    uuid id PK
    uuid run_id FK
    text summary
    jsonb data
}
SCENARIOS {
    uuid id PK
    string name
    string category
    text system_prompt
}
MODELS {
    uuid id PK
    string provider
    string model_name
    boolean active
}
```

" fullWidth="true" %}
