PayrollManagementSystem/backend/app/schemas/tplus_business_sync.py
liuwenxin 1e53792ad6 feat(T+): 完成数据贯通与自动接入闭环
打通 T+ 快照、业务、发货、回款和核算准备链路,保留来源差异并提供待补状态。
新增业务自动接入任务、跨平台读取服务托管、权限复核、来源关联和前端核对页面。
补充迁移、隔离集成测试、浏览器模拟验收及角色授权边界修复。
2026-11-05 18:47:13 +08:00

28 lines
697 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""业务接入边界:独立于核算月份和内部平账组。"""
from datetime import date
from uuid import UUID
from pydantic import BaseModel, ConfigDict, Field, field_validator
class SyncRange(BaseModel):
model_config = ConfigDict(extra="forbid")
start_date: date = date(2026, 3, 1)
@field_validator("start_date")
@classmethod
def check_start(cls, value):
if value < date(2026, 3, 1):
raise ValueError("本次接入从2026年3月起,更早欠款通过期初承接")
return value
class BusinessSyncUpdate(SyncRange):
enabled: bool
expected_version: int = Field(ge=0)
class BusinessSyncRun(SyncRange):
request_key: UUID