# Текущие canonical relation rules Источник: `canonical_layer/mappers.py` ## Текущий каталог semantic relations | Context | Field role | Relation | | --- | --- | --- | | register | recorder | register_recorded_by_document | | journal | ref | journal_refers_to_document | | document | counterparty | document_has_counterparty | | document | contract | document_has_contract | | document | organization | document_belongs_to_organization | | document | responsible | document_has_responsible | | document | currency | document_has_currency | | document | warehouse | document_has_warehouse | | document | cashflow_article | document_has_cashflow_article | | document | bank_account | document_has_bank_account | | register | supplier | register_relates_to_supplier | | register | buyer | register_relates_to_buyer | | register | invoice | register_relates_to_invoice | | register | contract | register_relates_to_contract | | register | organization | register_relates_to_organization | | register | account | register_relates_to_account | | register | item | register_relates_to_item | ## Базовые правила извлечения ссылок 1. Поле попадает в link, если это `_Key`, `*ref`, GUID или semantic-поле (например `Recorder`, `СчетФактура`). 2. `*_Type` используется как приоритетная подсказка типа target-сущности. 3. Нулевые GUID (`00000000-...`) отфильтровываются из canonical links. 4. Если `source_id` отсутствует, строится составной `cmp:` ключ.