完成推理模块的转移
This commit is contained in:
26
apps/business/detect/schemas/project_detect_file.py
Normal file
26
apps/business/detect/schemas/project_detect_file.py
Normal file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @version : 1.0
|
||||
# @Create Time : 2025/04/03 10:30
|
||||
# @File : project_detect_file.py
|
||||
# @IDE : PyCharm
|
||||
# @desc : pydantic 模型,用于数据库序列化操作
|
||||
from pydantic import BaseModel, Field, ConfigDict
|
||||
from typing import Optional
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class ProjectDetectFilePager(BaseModel):
|
||||
detect_id: Optional[int] = Field(..., description="训练集合id")
|
||||
pagerNum: Optional[int] = Field(None, description="当前页码")
|
||||
pagerSize: Optional[int] = Field(None, description="每页数量")
|
||||
|
||||
|
||||
class ProjectDetectFileOut(BaseModel):
|
||||
id: Optional[int] = Field(None, description="id")
|
||||
detect_id: Optional[int] = Field(..., description="训练集合id")
|
||||
file_name: Optional[str] = Field(None, description="文件名称")
|
||||
thumb_file_url: Optional[str] = Field(None, description="文件路径")
|
||||
create_time: Optional[datetime] = Field(None, description="上传时间")
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
Reference in New Issue
Block a user