20 lines
638 B
Python
20 lines
638 B
Python
from ...sync_system.strategy import DefaultSyncStrategy
|
|
from ...sync_system.config import StrategyConfig, OrphanAction, UpdateDirection
|
|
from schemas.user.user import UserListDetailItem
|
|
|
|
|
|
class UserSyncStrategy(DefaultSyncStrategy[UserListDetailItem]):
|
|
"""
|
|
User 同步策略(基础数据,仅拉取)。
|
|
"""
|
|
|
|
schema = UserListDetailItem
|
|
|
|
default_config = StrategyConfig(
|
|
auto_bind=True,
|
|
auto_bind_fields=["username"],
|
|
depend_fields={},
|
|
local_orphan_action=OrphanAction.NONE,
|
|
remote_orphan_action=OrphanAction.CREATE_LOCAL,
|
|
update_direction=UpdateDirection.PULL,
|
|
) |