feat: AI Worker 平台 MVP v1.0.0 - 多租户/项目管理/AI Worker/任务编排/HITL审核/成本治理
This commit is contained in:
@@ -0,0 +1,29 @@
|
|||||||
|
"""Artifact schemas."""
|
||||||
|
from pydantic import BaseModel, Field
|
||||||
|
from typing import Optional
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
|
||||||
|
class ArtifactCreate(BaseModel):
|
||||||
|
title: str = Field(..., min_length=1, max_length=500)
|
||||||
|
content: str = ""
|
||||||
|
artifact_type: str = "text"
|
||||||
|
sources: str = "[]"
|
||||||
|
|
||||||
|
|
||||||
|
class ArtifactResponse(BaseModel):
|
||||||
|
id: int
|
||||||
|
task_id: int
|
||||||
|
project_id: int
|
||||||
|
title: str
|
||||||
|
content: str
|
||||||
|
artifact_type: str
|
||||||
|
version: int
|
||||||
|
is_latest: str
|
||||||
|
created_by_user_id: Optional[int] = None
|
||||||
|
created_by_worker_id: Optional[int] = None
|
||||||
|
sources: str = "[]"
|
||||||
|
tenant_id: int
|
||||||
|
created_at: datetime
|
||||||
|
|
||||||
|
model_config = {"from_attributes": True}
|
||||||
Reference in New Issue
Block a user