Files
pickling-mes/backend/app/schemas/inspection.py
wangyu 193da0018f feat: 移除PDI和订单号字段,新增设备巡检模块
- 从物料跟踪页面移除订单号列和表单字段
- 从导航菜单移除PDI管理,添加设备巡检
- 新增InspectionLocation和InspectionRecord后端模型和API
- 新增设备巡检前端页面(左侧点位列表,右侧设备和历史记录)
2026-05-27 16:38:40 +08:00

38 lines
808 B
Python

from pydantic import BaseModel
from typing import Optional
from datetime import datetime
class InspectionLocationCreate(BaseModel):
code: str
name: str
description: Optional[str] = None
sort_order: int = 0
class InspectionLocationOut(InspectionLocationCreate):
id: int
created_at: datetime
class Config:
from_attributes = True
class InspectionRecordCreate(BaseModel):
location_id: int
equipment_code: Optional[str] = None
equipment_name: Optional[str] = None
scan_code: Optional[str] = None
inspector: str
result: str = "normal"
notes: Optional[str] = None
class InspectionRecordOut(InspectionRecordCreate):
id: int
location_name: Optional[str] = None
created_at: datetime
class Config:
from_attributes = True