前后端交互完成
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
from pydantic import BaseModel, Field
|
||||
from typing import Optional
|
||||
from typing import Optional, List
|
||||
|
||||
|
||||
class ProjectImage(BaseModel):
|
||||
@ -16,3 +16,25 @@ class ProjectImagePager(BaseModel):
|
||||
project_id: Optional[int] = Field(..., description="项目id")
|
||||
pagerNum: Optional[int] = Field(1, description="当前页码")
|
||||
pagerSize: Optional[int] = Field(10, description="每页数量")
|
||||
|
||||
|
||||
class ProjectImgLabelIn(BaseModel):
|
||||
label_id: int
|
||||
mark_center_x: str
|
||||
mark_center_y: str
|
||||
mark_width: str
|
||||
mark_height: str
|
||||
|
||||
|
||||
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")
|
||||
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
Reference in New Issue
Block a user