{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://ordinis.nstart.cloud/schemas/cuod/processing_level/1.0.0",
  "title": "Processing Level (уровень обработки)",
  "description": "Уровень обработки данных ДЗЗ — L0 raw → L4 derived products. Стандарт NASA/ESA + ГОСТ.",
  "type": "object",
  "required": ["code", "name", "sort_order", "status"],
  "additionalProperties": false,
  "x-id-source": "code",
  "properties": {
    "code": {
      "type": "string",
      "description": "Код уровня обработки. Например L0, L1A, L2.",
      "pattern": "^L[0-9][A-Z]?$",
      "x-unique": true
    },
    "name": {
      "type": "object",
      "x-localized": true,
      "description": "Краткое наименование уровня",
      "patternProperties": {
        "^[a-z]{2}-[A-Z]{2}$": { "type": "string", "minLength": 1 }
      },
      "required": ["ru-RU"]
    },
    "description": {
      "type": "object",
      "x-localized": true,
      "description": "Подробное описание содержания уровня",
      "patternProperties": {
        "^[a-z]{2}-[A-Z]{2}$": { "type": "string" }
      }
    },
    "sort_order": {
      "type": "integer",
      "description": "Порядок отображения для упорядочивания L0 → L1 → L2 → ...",
      "minimum": 0,
      "x-unique": true
    },
    "status": {
      "type": "string",
      "enum": ["active", "archived"]
    }
  }
}
