{
  "$schema": "../registry.schema.json",
  "version": 2,
  "default_project_directory": "docs/schemas",
  "systems": [
    {
      "id": "crm",
      "kind": "source",
      "name": "CRM",
      "engine": "api",
      "purpose": "客户来源系统"
    },
    {
      "id": "erp",
      "kind": "source",
      "name": "ERP",
      "engine": "vendor-db",
      "purpose": "客户补充来源系统"
    },
    {
      "id": "primary-postgres",
      "kind": "database",
      "name": "Primary PostgreSQL",
      "engine": "postgres",
      "purpose": "业务系统主库"
    },
    {
      "id": "analytics-mongo",
      "kind": "database",
      "name": "Analytics MongoDB",
      "engine": "mongodb",
      "purpose": "分析查询库"
    }
  ],
  "documents": [
    {
      "schema_id": "customer.source.crm.v1",
      "entity": "customer",
      "role": "source",
      "system_id": "crm",
      "document": "docs/schemas/sources/crm/customer.jsonc",
      "storage": "project"
    },
    {
      "schema_id": "customer.source.erp.v1",
      "entity": "customer",
      "role": "source",
      "system_id": "erp",
      "document": "docs/schemas/sources/erp/customer.jsonc",
      "storage": "project"
    },
    {
      "schema_id": "customer.canonical.v1",
      "entity": "customer",
      "role": "canonical",
      "document": "docs/schemas/canonical/customer.jsonc",
      "storage": "project",
      "derived_from": [
        "customer.source.crm.v1",
        "customer.source.erp.v1"
      ]
    },
    {
      "schema_id": "customer.target.primary-postgres.v1",
      "entity": "customer",
      "role": "target",
      "system_id": "primary-postgres",
      "document": "docs/schemas/targets/primary-postgres/customer.jsonc",
      "storage": "project",
      "derived_from": ["customer.canonical.v1"]
    },
    {
      "schema_id": "customer.target.analytics-mongo.v1",
      "entity": "customer",
      "role": "target",
      "system_id": "analytics-mongo",
      "document": "docs/schemas/targets/analytics-mongo/customer.jsonc",
      "storage": "project",
      "derived_from": ["customer.canonical.v1"]
    }
  ]
}
