docs: initial prototype of the db schema
This commit is contained in:
parent
c7ec61994b
commit
9c8987f5b1
1 changed files with 19 additions and 7 deletions
|
@ -1,17 +1,29 @@
|
|||
# Архитектура KV DB (Dragonfly)
|
||||
|
||||
- `apikey_{apikey}`
|
||||
- API ключ для приложений
|
||||
- Поля
|
||||
- `owner`
|
||||
- Имеет время окончания
|
||||
- `devices_{device_id}`
|
||||
- Поля
|
||||
- Вся информация о девайсе
|
||||
- `devices_{device_id}_{tai_timestamp}_{sensor_id}`
|
||||
- Только значение
|
||||
- `devices_{device_id}`
|
||||
- Имеет TTL
|
||||
- `devices_{device_uuid}`
|
||||
- Поля
|
||||
- `exists`: bool
|
||||
- `tls_only`: bool
|
||||
- `mtls_only`: bool
|
||||
- `lat`: decimal
|
||||
- `long`: decimal
|
||||
- `alt`: decimal
|
||||
- `devices_{device_uuid}_sensor{sensor_mac}_{tai_timestamp}`
|
||||
- Только значение
|
||||
- `devices_{device_uuid}_{sensor_mac}`
|
||||
- Поля
|
||||
- `unit`: str
|
||||
- `devices_{device_uuid}_commands`
|
||||
- `devices_mac{device_mac}`
|
||||
- Маппинг до device_uuid
|
||||
- `users_{user_uuid}`
|
||||
- username: string
|
||||
- password_hash: string
|
||||
|
||||
|
||||
!!!! Убедитесь что в переменных ключей нет `_` !!!!
|
||||
|
|
Loading…
Add table
Reference in a new issue