"""Preparation domain registration"""
from ...common.registry import DomainRegistry
from .sync_node import PreparationSyncNode, PreparationDetail
from .sync_strategy import PreparationSyncStrategy
from .jsonl_handler import PreparationJsonlHandler
from .api_handler import PreparationApiHandler
from ...sync_system.config import StrategyConfig, OrphanAction

# 注册 preparation domain
DomainRegistry.register(
    node_type="preparation",
    schema=PreparationDetail,
    node_class=PreparationSyncNode,
    strategy_class=PreparationSyncStrategy,
    jsonl_handler_class=PreparationJsonlHandler,
    api_handler_class=PreparationApiHandler,
    config=StrategyConfig(
        auto_bind_fields=["project_id", "code"],
        local_orphan_action=OrphanAction.NONE,
        remote_orphan_action=OrphanAction.NONE,
        depend_fields={"project_id": "project"}
    )
)
