{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/akeda-ru/json-schema/akeda-ru-core-item-moved-schema.json",
  "title": "CoreItemMoved",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/akeda-ru-core-accounting-items-api-openapi.yml#/components/schemas/CoreItemMoved",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "item"
  ],
  "properties": {
    "item": {
      "$ref": "#/$defs/CoreItem"
    }
  },
  "$defs": {
    "CoreItem": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "code",
        "name",
        "use_cashflow",
        "cashflow_section",
        "cashflow_sort_order",
        "use_pnl",
        "is_system",
        "pnl_sort_order",
        "usage_count"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/UUID"
        },
        "code": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "label_key": {
          "type": "string",
          "description": "Ключ перевода подписи системной статьи из посева (ERP-2627), вида common:seeded.items.<код>; есть, пока статья носит имя посева. Переименованная клиентом статья ключа не имеет — её имя одинаково на обоих языках"
        },
        "use_cashflow": {
          "type": "boolean"
        },
        "cashflow_section": {
          "type": "string",
          "enum": [
            "operating",
            "investing",
            "financing",
            "transfer",
            ""
          ]
        },
        "cashflow_section_name": {
          "type": "string"
        },
        "cashflow_parent_id": {
          "$ref": "#/$defs/UUID"
        },
        "cashflow_sort_order": {
          "type": "integer"
        },
        "use_pnl": {
          "type": "boolean"
        },
        "use_ledger": {
          "type": "boolean",
          "description": "Только проводки: статья разводит смыслы на счёте главной книги и не участвует ни в ДДС, ни в ОПиУ. Ставит только посев системной статьи."
        },
        "internal_turnover": {
          "type": "boolean",
          "description": "Статья внутреннего оборота между ЦФО; обороты исключаются из сводного ОПиУ (ERP-1493)"
        },
        "pnl_sign": {
          "type": "integer",
          "enum": [
            -1,
            1
          ]
        },
        "is_system": {
          "type": "boolean"
        },
        "pnl_parent_id": {
          "$ref": "#/$defs/UUID"
        },
        "pnl_sort_order": {
          "type": "integer"
        },
        "usage_count": {
          "type": "integer",
          "minimum": 0
        },
        "vat_kind": {
          "type": "string",
          "enum": [
            "",
            "general",
            "reduced",
            "zero",
            "exempt"
          ],
          "description": "Вид ставки НДС сделки без товара по статье дохода; пусто — общая"
        },
        "kind": {
          "type": "string"
        },
        "party_requirement": {
          "type": "string",
          "enum": [
            "",
            "none",
            "contact",
            "person"
          ]
        },
        "is_active": {
          "type": "boolean"
        },
        "replaced_by": {
          "$ref": "#/$defs/UUID"
        },
        "owner_module": {
          "type": "string"
        },
        "module_available": {
          "type": "boolean"
        },
        "is_group": {
          "type": "boolean",
          "description": "Узел-группа дерева статей, а не статья (ERP-2529): на неё не разносят, в отчётах ДДС и ОПиУ — заголовок с итогом статей внутри"
        }
      }
    },
    "UUID": {
      "type": "string",
      "format": "uuid"
    }
  }
}