1) 客服 Agent 四份交付文档 + 构建脚手架:品牌由包装占位 XX科技 / 旧名 南方财富 统一为南方基金(热线 400-889-8899 / 官网 nffund.com),系统名改为「智能服务系统」; 同步追加 §0.4 修订记录行,工程记录行保留原占位字面以支撑硬编码扫描验收。 2) 开发文档:清理 28 份已作废/残留文档(14 份移出归档 + 14 份仓库副本), 新增《文档规整方案与开发前待决事项-2026-09-17》。 3) 客服agent 四份交付文档首次纳入本分支。
101 lines
3.0 KiB
Python
101 lines
3.0 KiB
Python
"""场外基金接口请求结构。"""
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
from app.core.offsite_fund_contracts import OperationDecision
|
|
|
|
|
|
class OffsiteConfirmRequest(BaseModel):
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
decision: OperationDecision
|
|
operator_id: str = Field(min_length=1, max_length=64)
|
|
|
|
|
|
class OffsiteRecalculateRequest(BaseModel):
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
fund_code: str | None = Field(default=None, max_length=32)
|
|
application_date: str = Field(min_length=8, max_length=32)
|
|
|
|
|
|
class OffsiteNotificationRequest(BaseModel):
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
notification_type: str = Field(
|
|
pattern="^(risk|settlement|mail_return|normal_return|exception_return)$"
|
|
)
|
|
operator_id: str = Field(min_length=1, max_length=64)
|
|
|
|
|
|
class OffsiteNotificationSendRequest(BaseModel):
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
operator_id: str = Field(min_length=1, max_length=64)
|
|
operator_confirmed: bool
|
|
final_content: str | None = Field(default=None, max_length=10000)
|
|
|
|
|
|
class OffsiteTriggerNl2SqlRequest(BaseModel):
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
operator_id: str = Field(min_length=1, max_length=64)
|
|
manual_confirmed: bool
|
|
|
|
|
|
class OffsiteRecognitionRetryRequest(BaseModel):
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
operator_id: str = Field(min_length=1, max_length=64)
|
|
|
|
|
|
class OffsiteMailboxRecoveryRequest(BaseModel):
|
|
"""收件游标解除阻塞请求。"""
|
|
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
operator_id: str = Field(min_length=1, max_length=64)
|
|
|
|
|
|
class OffsiteMailDeletionRequest(BaseModel):
|
|
"""邮件删除请求:物理删除邮件及其场外业务链路,审计记录除外。"""
|
|
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
operator_id: str = Field(min_length=1, max_length=64)
|
|
|
|
|
|
class OffsiteRuleRecalculationRequest(BaseModel):
|
|
"""重新判定规则只接受操作人身份,数值一律取自已落库的识别与查询结果。"""
|
|
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
operator_id: str = Field(min_length=1, max_length=64)
|
|
|
|
|
|
class OffsiteRecognitionCorrectionItem(BaseModel):
|
|
"""单个附件的 OCR 识别字段人工修正值。"""
|
|
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
attachment_id: str = Field(min_length=1, max_length=24)
|
|
fields: dict[str, str] = Field(default_factory=dict)
|
|
|
|
|
|
class OffsiteRecognitionCorrectionRequest(BaseModel):
|
|
"""OCR 识别字段人工修正请求:一次提交一封邮件下的一个或多个附件。"""
|
|
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
operator_id: str = Field(min_length=1, max_length=64)
|
|
attachments: list[OffsiteRecognitionCorrectionItem] = Field(min_length=1)
|
|
|
|
|
|
class OffsiteNl2SqlCorrectionRequest(BaseModel):
|
|
"""NL2SQL 返回字段人工修正请求。"""
|
|
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
operator_id: str = Field(min_length=1, max_length=64)
|
|
fields: dict[str, str] = Field(default_factory=dict)
|