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


class LarChangeSyncStrategy(DefaultSyncStrategy[LarChangeDetailSchema]):
    """
    LAR Change 同步策略。
    """

    schema = LarChangeDetailSchema

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