21 lines
744 B
Python
21 lines
744 B
Python
from ...sync_system.strategy import DefaultSyncStrategy
|
|
from ...sync_system.config import StrategyConfig, OrphanAction, UpdateDirection
|
|
from schemas.construction.construction import ConstructionResponse
|
|
|
|
|
|
class ConstructionTaskSyncStrategy(DefaultSyncStrategy[ConstructionResponse]):
|
|
"""
|
|
Construction Task 同步策略(合同子业务)。
|
|
"""
|
|
|
|
schema = ConstructionResponse
|
|
|
|
default_config = StrategyConfig(
|
|
auto_bind=True,
|
|
auto_bind_fields=["contract_id", "task_type"],
|
|
depend_fields={"contract_id": "contract", "project_id": "project"},
|
|
local_orphan_action=OrphanAction.CREATE_REMOTE,
|
|
remote_orphan_action=OrphanAction.NONE,
|
|
update_direction=UpdateDirection.PUSH,
|
|
)
|