argos/docs/developer/models.md
2024-09-26 05:09:34 +02:00

54 lines
812 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
description: Whats in the database?
---
# The data model
```{mermaid}
classDiagram
direction RL
class Task {
- url
- domain
- check
- expected
- frequency
- selected_by
- selected_at
- completed_at
- next_run
- severity
- last_severity_update
}
class Result{
- task : Task
- task_id
- agent_id
- submitted_at
- status
- severity
- context
}
class ConfigCache {
- name
- val
- updated_at
}
class User {
- username
- password
- disabled
- created_at
- updated_at
- last_login_at
}
Result "*" o-- "1" Task : has many
```
The `severity` attribute in `Task` is the severity of the last `Result` submitted by an agent.
```{literalinclude} ../../argos/server/models.py
---
caption: models.py
---
```