Модели в БД #5

Closed
opened 2025-04-04 13:17:30 +00:00 by a.petrov · 0 comments
  • Модель Satellite:
    • Поле uuid PK + index
    • Поле owner с FK на User
    • Поле name с названием
    • Поле status, enum {"Unknown", "Prelaunch", "Launched", "Landed", "Recovered"}
    • Поля created_at, updated_at (автоматические джанго)
    • Поле metadata, jsonb с всякой всячиной для фронта
  • Модель Packet:
    • Поле owner с FK на User (а нужно ли?)
    • Поле satellite с FK на Satellite
    • Поле uuid PK + index
    • Поле timestamp datetime
    • Поля lat, lon, alt float
    • Поле type, пусть будет int
    • Поле payload json/jsonb
  • Модель Prediction
    • Поле owner с FK на User
    • Nullable поле satellite с FK на Satellite (а нужно ли?)
    • Поле is_auto boolean, если true не показываем в ListAPIVIew
    • Поля created_at, updated_at (автоматические джанго)
    • Поле profile enum {"standard_profile", "float_profile", "reverse_profile", "custom_profile"}
    • Поле api_address, varchar?
    • Поле api_version, varchar?
    • Поле tawhiri_request jsonb с полным запросом в tawhiri
    • Поле tawhiri_response jsonb с полным ответом tawhiri; убрать из сериализатора для ListAPIVIew
- [x] Модель` Satellite`: - [x] Поле `uuid` PK + index - [x] Поле `owner` с FK на `User` - [x] Поле `name` с названием - [x] Поле `status`, enum {"Unknown", "Prelaunch", "Launched", "Landed", "Recovered"} - [x] Поля `created_at`, `updated_at` (автоматические джанго) - [x] Поле `metadata`, jsonb с всякой всячиной для фронта - [x] Модель `Packet`: - [x] Поле `owner` с FK на `User` (а нужно ли?) - [x] Поле `satellite` с FK на `Satellite` - [x] Поле `uuid` PK + index - [x] Поле `timestamp` datetime - [x] Поля `lat`, `lon`, `alt` float - [x] Поле `type`, пусть будет int - [x] Поле `payload` json/jsonb - [x] Модель `Prediction` - [x] Поле `owner` с FK на `User` - [x] Nullable поле `satellite` с FK на `Satellite` (а нужно ли?) - [x] Поле `is_auto` boolean, если `true` не показываем в ListAPIVIew - [x] Поля `created_at`, `updated_at` (автоматические джанго) - [x] Поле `profile` enum {"standard_profile", "float_profile", "reverse_profile", "custom_profile"} - [x] Поле `api_address`, varchar? - [x] Поле `api_version`, varchar? - [x] Поле `tawhiri_request` jsonb с полным запросом в tawhiri - [x] Поле `tawhiri_response` jsonb с полным ответом tawhiri; убрать из сериализатора для ListAPIVIew
a.petrov added this to the К запуску project 2025-04-04 13:17:30 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: afanasyev.aa/api-drf-1#5
No description provided.