Единый язык предметной области

Правила использования доменных терминов в коде, документации и UI. Полные определения терминов — в ../GLOSSARY.md. Этот документ про форму, а не про содержание.

Правила

  1. Если термин присутствует в GLOSSARY.md, используйте его в канонической форме. Произвольные синонимы запрещены.
  2. Каждый доменный термин имеет одно машинное имя (snake_case) — оно ниже в таблицах. Это имя используется в именах полей БД, ключах JSON, идентификаторах событий, конфиг-ключах.
  3. Если в коде ProductCategory, а в документации “товарный класс” — это баг, откройте задачу.
  4. Новые термины заводятся одновременно в GLOSSARY.md и в соответствующей секции ниже.

Машинные имена

Термин → snake_case идентификатор. Определения терминов — по ссылке в глоссарии.

Bounded Contexts и DDD

ТерминМашинное имя
Bounded Contextbounded_context
Context Mapcontext_map
Anti-Corruption Layeracl
Published Languagepl
Open Host Serviceohs
Shared Kernelshared_kernel
Domain Eventdomain_event
Integration Eventintegration_event
Aggregateaggregate
Policypolicy

Каталог и товары

ТерминМашинное имя
Canonical Productcanonical_product
Identity Profileidentity_profile
Critical Attributecritical_attribute
Identity Signatureidentity_signature
Equivalence Classequivalence_class
Lifecycle Statuslifecycle_status
Characteristiccharacteristic
Unitunit
Manufacturermanufacturer
Manufacturer Aliasmanufacturer_alias
Classification Tagclassification_tag
Raw Supplier Payloadraw_payload

Supplier Offers и наблюдения

ТерминМашинное имя
Supplier Offersupplier_offer
Supplier Offer Observationsupplier_offer_observation
Match Confidencematch_confidence
Warehousewarehouse
Warehouse Kindwarehouse_kind
Stockstock
Stock Forecaststock_forecast
Price Setprice_set
Price Kindprice_kind
Pricing Modepricing_mode
Sku Identity Packsku_identity_pack
Sellerseller
Seller Ratingseller_rating
Preferred Seller Policypreferred_seller_policy
Identity Standardidentity_standard
Taxonomy Characteristic Mappingtaxonomy_characteristic_mapping
Taxonomy Class Mappingtaxonomy_class_mapping
External Identityexternal_identity
Mapping Targetmapping_target
Multi-Currency Pricesmulti_currency_prices
Price Validity Windowprice_validity_window
Incremental Sync Cursorincremental_sync_cursor
Master Key Token Exchangemaster_key_token_exchange

Ценообразование

ТерминМашинное имя
Price Ruleprice_rule
Pricing Contextpricing_context
Pricing Resultpricing_result
Customer Pricing Groupcustomer_pricing_group
Logistics Costlogistics_cost
Custom Pricing Handlercustom_pricing_handler
Pricing Adjustmentpricing_adjustment
Observation Sourceobservation_source

Клиент

ТерминМашинное имя
Customercustomer
Customer Typecustomer_type
Contractcontract
Auth Identityauth_identity
Sessionsession
Session Contextsession_context

Credentials

ТерминМашинное имя
Supplier Credentialsupplier_credential
Credential Scopecredential_scope
Auth Schemaauth_schema
Credential Fingerprintfingerprint
Supplier Credential Groupsupplier_credential_group
Credential Contextcredential_context

Сметы

ТерминМашинное имя
Estimateestimate
Estimate Versionestimate_version
Estimate Lineestimate_line
Estimate Optimizationestimate_optimization
Optimization Modeoptimization_mode
Estimate Alternativeestimate_alternative
Estimate Explanationestimate_explanation

Сеть поставщиков

ТерминМашинное имя
Suppliersupplier
Supplier Rolesupplier_role
Supplier Relationshipsupplier_relationship
Supply Chain Tracesupply_chain_trace
Trust Leveltrust_level

Поступление данных

ТерминМашинное имя
Enrichment Jobenrichment_job
Job Kindjob_kind
Connectorconnector

Видимость данных

ТерминМашинное имя
Data Visibility Policydata_visibility_policy
Subjectsubject
Target Kindtarget_kind
Effecteffect

Модерация (AI)

ТерминМашинное имя
Moderation Queuemoderation_queue
Moderation Casemoderation_case
Case Kindcase_kind
Agent Runneragent_runner
Agent Decisionagent_decision
Verdictverdict
Proposed Actionproposed_action
Case Escalatedcase_escalated
Attribute Aliasattribute_alias

Запрещённые термины

ТерминВместо него
«Категория», categoryclassification_tag или identity_profile (category-agnostic дизайн)
«Товарная группа»то же — classification_tag / identity_profile
SKU без контекстаcanonical_product_id или supplier_sku (в зависимости от слоя)
product_category, category_idте же замены

Связано