first commit

This commit is contained in:
strepsiades
2026-03-09 16:31:42 +08:00
commit 4a9c444b10
486 changed files with 52479 additions and 0 deletions
@@ -0,0 +1,20 @@
from ...sync_system.strategy import DefaultSyncStrategy
from ...sync_system.config import StrategyConfig, OrphanAction, UpdateDirection
from schemas.project_extensions.generator_unit import GeneratorUnitProject
class UnitsSyncStrategy(DefaultSyncStrategy[GeneratorUnitProject]):
"""
Units 同步策略(项目扩展)。
"""
schema = GeneratorUnitProject
default_config = StrategyConfig(
auto_bind=True,
auto_bind_fields=["project_id", "serial_number"],
depend_fields={"project_id": "project"},
local_orphan_action=OrphanAction.NONE,
remote_orphan_action=OrphanAction.NONE,
update_direction=UpdateDirection.PUSH,
)