first commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
from ...sync_system.strategy import DefaultSyncStrategy
|
||||
from ...sync_system.config import StrategyConfig, OrphanAction, UpdateDirection
|
||||
from schemas.material.material import MaterialResponse
|
||||
|
||||
|
||||
class MaterialSyncStrategy(DefaultSyncStrategy[MaterialResponse]):
|
||||
"""
|
||||
Material 同步策略(合同子业务)。
|
||||
"""
|
||||
|
||||
schema = MaterialResponse
|
||||
|
||||
default_config = StrategyConfig(
|
||||
auto_bind=True,
|
||||
auto_bind_fields=["contract_id", "material_type"],
|
||||
depend_fields={"contract_id": "contract", "project_id": "project"},
|
||||
local_orphan_action=OrphanAction.CREATE_REMOTE,
|
||||
remote_orphan_action=OrphanAction.NONE,
|
||||
update_direction=UpdateDirection.PUSH,
|
||||
)
|
||||
Reference in New Issue
Block a user