46 lines
1.3 KiB
Python
46 lines
1.3 KiB
Python
"""场外基金接口请求结构。"""
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
from app.core.offsite_fund_contracts import OperationDecision, ReceiveRecognizedMailRequest
|
|
|
|
|
|
class OffsiteMailRecognizeRequest(ReceiveRecognizedMailRequest):
|
|
pass
|
|
|
|
|
|
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 = Field(min_length=1, 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)$")
|
|
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
|