项目初次提交
This commit is contained in:
25
apps/business/project/schemas/project_img_leafer.py
Normal file
25
apps/business/project/schemas/project_img_leafer.py
Normal file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# @version : 1.0
|
||||
# @Create Time : 2025/04/03 10:29
|
||||
# @File : project_img_leafer.py
|
||||
# @IDE : PyCharm
|
||||
# @desc : pydantic 模型,用于数据库序列化操作
|
||||
|
||||
from pydantic import BaseModel, Field, ConfigDict
|
||||
from typing import Optional, List
|
||||
|
||||
from . import ProjectImgLabelIn
|
||||
|
||||
|
||||
class ProjectImgLeaferLabel(BaseModel):
|
||||
image_id: Optional[int] = Field(..., description="图片id")
|
||||
leafer: Optional[dict] = Field(..., description="保存的leafer")
|
||||
label_infos: List[ProjectImgLabelIn] = Field(..., description="标签框选信息")
|
||||
|
||||
|
||||
class ProjectImgLeaferOut(BaseModel):
|
||||
image_id: Optional[int] = Field(..., description="图片id")
|
||||
leafer: Optional[dict] = Field(..., description="保存的leafer")
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
Reference in New Issue
Block a user