feat(cuod-bundle): spacecraft.status — FK на spacecraft_status
Был inline enum [PLANNED, ACTIVE, INACTIVE, DECAYED, LOST] — но spacecraft_status справочник существует с нормализованными codes: PLANNED, LAUNCHED, OPERATIONAL, STANDBY, DEGRADED, DECOMMISSIONED, LOST. Теперь spacecraft.status = x-references на spacecraft_status.code. Profit: - i18n названий статусов (Запланирован/Эксплуатация/...) - description per status (что значит DEGRADED vs DECOMMISSIONED) - Расширяемо без schema migration Breaking change: existing 14 records со status=ACTIVE/DECAYED не пройдут validation. Решение: full re-import bundle на staging (TRUNCATE + restart ordinis-app → CuodBundleStartupRunner пересоздаст все).
This commit is contained in:
@@ -60,7 +60,9 @@
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": ["PLANNED", "ACTIVE", "INACTIVE", "DECAYED", "LOST"]
|
||||
"description": "FK на spacecraft_status.code",
|
||||
"pattern": "^[A-Z][A-Z0-9_]{1,31}$",
|
||||
"x-references": "spacecraft_status.code"
|
||||
},
|
||||
"orbit": {
|
||||
"type": "object",
|
||||
|
||||
Reference in New Issue
Block a user