From cd5ee1fcf6a0555e1969c83bdea2e6c347fef2cd Mon Sep 17 00:00:00 2001 From: "Zimin A.N." Date: Mon, 25 May 2026 14:18:34 +0300 Subject: [PATCH] =?UTF-8?q?feat(cuod):=20=D0=BE=D1=81=D1=82=D0=B0=D0=BB?= =?UTF-8?q?=D1=8C=D0=BD=D1=8B=D0=B5=20FK=20=E2=80=94=20country,=20industry?= =?UTF-8?q?=5Fsector,=20frequency=5Fband?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pass 2 по тому же паттерну. Все target-словари существуют, FK-валидация на бэке уже работает — просто помечаем поля чтобы admin-UI рендерил picker вместо free-text. Изменения: - mission.country → x-references country.code - spacecraft.country → x-references country.code - consumer.industry_sector → x-references industry_sector.code - consumer.country → x-references country.code - antenna.supported_bands.items → x-references frequency_band.code Schema bumps: - spacecraft 2.0.0 → 2.1.0 - mission 1.1.0 (без доп. bump'а — country добавляется в этот же релиз) - consumer 1.0.0 → 1.1.0 - antenna 1.0.0 → 1.1.0 - bundle 1.3.4 → 1.3.5 Skip: spacecraft.spectrum_bands (enum смешивает оптику и радиодиапазоны — нет одного словаря-target'а; разделение на два поля — отдельная задача). --- .../src/main/resources/bundles/cuod/antenna.schema.json | 4 ++-- .../src/main/resources/bundles/cuod/consumer.schema.json | 6 +++--- .../src/main/resources/bundles/cuod/manifest.json | 8 ++++---- .../src/main/resources/bundles/cuod/mission.schema.json | 5 +++-- .../main/resources/bundles/cuod/spacecraft.schema.json | 7 ++++--- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/ordinis-cuod-bundle/src/main/resources/bundles/cuod/antenna.schema.json b/ordinis-cuod-bundle/src/main/resources/bundles/cuod/antenna.schema.json index d445460..452f122 100644 --- a/ordinis-cuod-bundle/src/main/resources/bundles/cuod/antenna.schema.json +++ b/ordinis-cuod-bundle/src/main/resources/bundles/cuod/antenna.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://ordinis.nstart.cloud/schemas/cuod/antenna/1.0.0", + "$id": "https://ordinis.nstart.cloud/schemas/cuod/antenna/1.1.0", "title": "Antenna (наземные антенны)", "description": "Антенны наземных станций приёма с характеристиками. FK на ground_station.", "type": "object", @@ -12,7 +12,7 @@ "name": { "type": "object", "x-localized": true, "patternProperties": { "^[a-z]{2}-[A-Z]{2}$": { "type": "string", "minLength": 1 } }, "required": ["ru-RU"] }, "ground_station": { "type": "string", "description": "FK ground_station.code.", "pattern": "^[A-Z][A-Z0-9_]{1,31}$", "x-references": "ground_station.code" }, "diameter_m": { "type": "number", "minimum": 0.5, "maximum": 100 }, - "supported_bands": { "type": "array", "items": { "type": "string", "pattern": "^[A-Z][A-Z0-9_]{1,31}$" }, "uniqueItems": true }, + "supported_bands": { "type": "array", "description": "Поддерживаемые радиодиапазоны — FK на frequency_band.code (C, X, Ku, Ka и т.п.)", "items": { "type": "string", "pattern": "^[A-Z][A-Z0-9_]{1,31}$", "x-references": "frequency_band.code" }, "uniqueItems": true }, "g_t_db_per_k": { "type": "number", "description": "G/T (gain over noise temperature), дБ/К.", "minimum": -10, "maximum": 60 }, "status": { "type": "string", "enum": ["active", "maintenance", "decommissioned", "archived"] } } diff --git a/ordinis-cuod-bundle/src/main/resources/bundles/cuod/consumer.schema.json b/ordinis-cuod-bundle/src/main/resources/bundles/cuod/consumer.schema.json index 2260108..9e971de 100644 --- a/ordinis-cuod-bundle/src/main/resources/bundles/cuod/consumer.schema.json +++ b/ordinis-cuod-bundle/src/main/resources/bundles/cuod/consumer.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://ordinis.nstart.cloud/schemas/cuod/consumer/1.0.0", + "$id": "https://ordinis.nstart.cloud/schemas/cuod/consumer/1.1.0", "title": "Consumer (потребитель данных ДЗЗ)", "description": "Юридические лица — заказчики/получатели снимков и продуктов ЦУОД.", "type": "object", @@ -24,8 +24,8 @@ "pattern": "^[A-Z][A-Z0-9_]{1,31}$", "x-references": "consumer_type.code" }, - "industry_sector": { "type": "string", "pattern": "^[A-Z][A-Z0-9_]{1,31}$" }, - "country": { "type": "string", "pattern": "^[A-Z]{2}$" }, + "industry_sector": { "type": "string", "description": "FK на industry_sector.code.", "pattern": "^[A-Z][A-Z0-9_]{1,31}$", "x-references": "industry_sector.code" }, + "country": { "type": "string", "description": "FK на country.code (ISO 3166-1 alpha-2).", "pattern": "^[A-Z]{2}$", "x-references": "country.code" }, "inn": { "type": "string", "description": "ИНН (10 или 12 цифр).", diff --git a/ordinis-cuod-bundle/src/main/resources/bundles/cuod/manifest.json b/ordinis-cuod-bundle/src/main/resources/bundles/cuod/manifest.json index e9cd186..e8ad94a 100644 --- a/ordinis-cuod-bundle/src/main/resources/bundles/cuod/manifest.json +++ b/ordinis-cuod-bundle/src/main/resources/bundles/cuod/manifest.json @@ -2,15 +2,15 @@ "bundle": "cuod", "displayName": "ЦУОД ДЗЗ", "description": "Bundle справочников для Центра Управления Обработкой Данных ДЗЗ. Anchor v1.", - "version": "1.3.4", + "version": "1.3.5", "supportedLocales": ["ru-RU", "en-US"], "defaultLocale": "ru-RU", "dictionaries": [ - { "name": "spacecraft", "displayName": "Космические аппараты", "description": "Каталог КА (космических аппаратов) ДЗЗ-миссий", "scope": "PUBLIC", "schemaResource": "spacecraft.schema.json", "schemaVersion": "2.0.0", "approvalRequired": true }, + { "name": "spacecraft", "displayName": "Космические аппараты", "description": "Каталог КА (космических аппаратов) ДЗЗ-миссий", "scope": "PUBLIC", "schemaResource": "spacecraft.schema.json", "schemaVersion": "2.1.0", "approvalRequired": true }, { "name": "satellite_type", "displayName": "Типы КА", "description": "Классификация типов космических аппаратов по миссиям и характеристикам", "scope": "PUBLIC", "schemaResource": "satellite_type.schema.json", "schemaVersion": "1.0.0" }, { "name": "spacecraft_status", "displayName": "Статусы КА", "description": "Жизненный цикл КА: planned → operational → decommissioned/lost.", "scope": "PUBLIC", "schemaResource": "spacecraft_status.schema.json", "schemaVersion": "1.0.0" }, { "name": "ground_station", "displayName": "Наземные станции", "description": "Каталог наземных пунктов приёма и управления", "scope": "PUBLIC", "schemaResource": "ground_station.schema.json", "schemaVersion": "1.0.0", "approvalRequired": true }, - { "name": "antenna", "displayName": "Антенны", "description": "Антенны наземных станций с G/T и поддерживаемыми диапазонами.", "scope": "PUBLIC", "schemaResource": "antenna.schema.json", "schemaVersion": "1.0.0" }, + { "name": "antenna", "displayName": "Антенны", "description": "Антенны наземных станций с G/T и поддерживаемыми диапазонами.", "scope": "PUBLIC", "schemaResource": "antenna.schema.json", "schemaVersion": "1.1.0" }, { "name": "mission", "displayName": "Миссии / программы", "description": "Программы ДЗЗ — Ресурс-П, Канопус-В, Sentinel и т.д. Группируют семейства КА.", "scope": "PUBLIC", "schemaResource": "mission.schema.json", "schemaVersion": "1.1.0" }, { "name": "instrument", "displayName": "Инструменты съёмки", "description": "Полезная нагрузка / сенсоры на борту КА (Геотон-Л1, MODIS, C-SAR, ...)", "scope": "PUBLIC", "schemaResource": "instrument.schema.json", "schemaVersion": "1.1.0", "approvalRequired": true }, { "name": "sensor_type", "displayName": "Типы сенсоров", "description": "Класс полезной нагрузки: optical/SAR/hyperspectral/lidar/thermal.", "scope": "PUBLIC", "schemaResource": "sensor_type.schema.json", "schemaVersion": "1.0.0" }, @@ -37,7 +37,7 @@ { "name": "imaging_task_type", "displayName": "Типы задач на съёмку", "description": "Плановая периодическая, заказная, экстренная, стерео.", "scope": "PUBLIC", "schemaResource": "imaging_task_type.schema.json", "schemaVersion": "1.0.0" }, { "name": "acquisition_mode", "displayName": "Режимы съёмки", "description": "Nadir/off-nadir/Stripmap/Spotlight/ScanSAR/Stereo.", "scope": "PUBLIC", "schemaResource": "acquisition_mode.schema.json", "schemaVersion": "1.0.0" }, { "name": "priority_class", "displayName": "Классы приоритета", "description": "P0–P5 универсальные приоритеты для tasking и доставки.", "scope": "PUBLIC", "schemaResource": "priority_class.schema.json", "schemaVersion": "1.0.0" }, - { "name": "consumer", "displayName": "Потребители", "description": "Юр. лица — заказчики и получатели снимков (МЧС, Минприроды, Росреестр).", "scope": "INTERNAL", "schemaResource": "consumer.schema.json", "schemaVersion": "1.0.0" }, + { "name": "consumer", "displayName": "Потребители", "description": "Юр. лица — заказчики и получатели снимков (МЧС, Минприроды, Росреестр).", "scope": "INTERNAL", "schemaResource": "consumer.schema.json", "schemaVersion": "1.1.0" }, { "name": "consumer_type", "displayName": "Типы потребителей", "description": "Министерство/агентство/госпредприятие/коммерческая.", "scope": "PUBLIC", "schemaResource": "consumer_type.schema.json", "schemaVersion": "1.0.0" }, { "name": "industry_sector", "displayName": "Отрасли применения", "description": "Сельхоз/лесное/картография/ЧС/экология/нефтегаз/Арктика.", "scope": "PUBLIC", "schemaResource": "industry_sector.schema.json", "schemaVersion": "1.0.0" }, { "name": "coverage_zone", "displayName": "Зоны покрытия", "description": "Федеральные округа РФ + Арктическая зона.", "scope": "PUBLIC", "schemaResource": "coverage_zone.schema.json", "schemaVersion": "1.0.0" }, diff --git a/ordinis-cuod-bundle/src/main/resources/bundles/cuod/mission.schema.json b/ordinis-cuod-bundle/src/main/resources/bundles/cuod/mission.schema.json index ee41af2..3384f79 100644 --- a/ordinis-cuod-bundle/src/main/resources/bundles/cuod/mission.schema.json +++ b/ordinis-cuod-bundle/src/main/resources/bundles/cuod/mission.schema.json @@ -47,8 +47,9 @@ }, "country": { "type": "string", - "description": "ISO 3166-1 alpha-2 код страны", - "pattern": "^[A-Z]{2}$" + "description": "Страна программы — FK на country.code (ISO 3166-1 alpha-2)", + "pattern": "^[A-Z]{2}$", + "x-references": "country.code" }, "status": { "type": "string", diff --git a/ordinis-cuod-bundle/src/main/resources/bundles/cuod/spacecraft.schema.json b/ordinis-cuod-bundle/src/main/resources/bundles/cuod/spacecraft.schema.json index d66f184..fc28162 100644 --- a/ordinis-cuod-bundle/src/main/resources/bundles/cuod/spacecraft.schema.json +++ b/ordinis-cuod-bundle/src/main/resources/bundles/cuod/spacecraft.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://ordinis.nstart.cloud/schemas/cuod/spacecraft/1.0.0", + "$id": "https://ordinis.nstart.cloud/schemas/cuod/spacecraft/2.1.0", "title": "Spacecraft (КА)", "description": "Космический аппарат ДЗЗ. Идентифицируется designator'ом (международное обозначение COSPAR/NORAD ID).", "type": "object", @@ -36,8 +36,9 @@ }, "country": { "type": "string", - "description": "ISO 3166-1 alpha-2 код страны-оператора", - "pattern": "^[A-Z]{2}$" + "description": "Страна-оператор — FK на country.code (ISO 3166-1 alpha-2)", + "pattern": "^[A-Z]{2}$", + "x-references": "country.code" }, "satellite_type_code": { "type": "string",