from ...sync_system.strategy import DefaultSyncStrategy
from ...sync_system.config import StrategyConfig, OrphanAction, UpdateDirection
from schemas.project_extensions.lar import LarDetailSchema


class LarSyncStrategy(DefaultSyncStrategy[LarDetailSchema]):
    """
    LAR 同步策略（项目扩展）。
    """

    schema = LarDetailSchema

    default_config = StrategyConfig(
        auto_bind=True,
        auto_bind_fields=["project_id"],
        depend_fields={"project_id": "project"},
        local_orphan_action=OrphanAction.NONE,
        remote_orphan_action=OrphanAction.NONE,
        update_direction=UpdateDirection.PUSH,
    )