feat: 初始化孕育无忧全栈项目基础代码结构
完成项目初始搭建,包含后端FastAPI+MongoDB服务、前端React+Vite项目的完整基础结构,添加各类配置文件与依赖清单,涵盖核心业务初始框架。
This commit is contained in:
44
backend/app/schemas/report.py
Normal file
44
backend/app/schemas/report.py
Normal file
@@ -0,0 +1,44 @@
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class DataItemSchema(BaseModel):
|
||||
name: str
|
||||
value: str
|
||||
unit: str = ""
|
||||
reference_range: str = ""
|
||||
status: str = "normal"
|
||||
category: str = ""
|
||||
|
||||
|
||||
class ReportVerifyRequest(BaseModel):
|
||||
"""数据校对提交"""
|
||||
data_items: list[DataItemSchema]
|
||||
symptoms: Optional[list[str]] = None
|
||||
notes: Optional[str] = None
|
||||
report_type: Optional[str] = None
|
||||
|
||||
|
||||
class ReportResponse(BaseModel):
|
||||
id: str
|
||||
report_type: str
|
||||
pregnancy_week: Optional[int]
|
||||
image_urls: list[str]
|
||||
data_items: list[DataItemSchema]
|
||||
symptoms: Optional[list[str]]
|
||||
notes: Optional[str]
|
||||
status: str
|
||||
overall_status: str
|
||||
created_at: datetime
|
||||
|
||||
|
||||
class ReportListItem(BaseModel):
|
||||
id: str
|
||||
report_type: str
|
||||
pregnancy_week: Optional[int]
|
||||
overall_status: str
|
||||
summary: str = ""
|
||||
item_count: int = 0
|
||||
created_at: datetime
|
||||
Reference in New Issue
Block a user