This commit is contained in:
BBIT-Kai
2026-07-16 09:28:57 +08:00
parent cb9a411c55
commit 7be72a50ad
13 changed files with 3383 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
from typing import Literal
from pydantic import BaseModel, Field, model_validator
class CubeReportFileInput(BaseModel):
id: str = Field(min_length=1)
name: str = Field(min_length=1, max_length=255)
type: Literal["custom", "document", "image"] = "custom"
class SendCubeReportMessageRequest(BaseModel):
content: str = Field(default="", max_length=8000)
conversationId: str | None = None
allowGlobal: bool = False
tenantId: str | None = Field(default=None, max_length=64)
tenantName: str | None = Field(default=None, max_length=200)
files: list[CubeReportFileInput] = Field(default_factory=list, max_length=5)
@model_validator(mode="after")
def validate_content(self):
if not self.content.strip() and not self.files:
raise ValueError("消息内容和附件不能同时为空")
return self
class RenameCubeReportConversationRequest(BaseModel):
name: str = Field(min_length=1, max_length=200)