feat: 实现后端核心业务逻辑 (Auth鉴权、二维码服务、看板与产品端点)
This commit is contained in:
24
backend/app/schemas/order.py
Normal file
24
backend/app/schemas/order.py
Normal file
@ -0,0 +1,24 @@
|
||||
"""生产订单 Pydantic Schemas"""
|
||||
from __future__ import annotations
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
class OrderCreate(BaseModel):
|
||||
"""创建订单"""
|
||||
order_no: str = Field(..., max_length=64, description="订单编号")
|
||||
customer_info: str | None = Field(None, max_length=500, description="客户信息")
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class OrderResponse(BaseModel):
|
||||
"""订单响应"""
|
||||
id: uuid.UUID
|
||||
order_no: str
|
||||
customer_info: str | None
|
||||
status: str
|
||||
created_at: datetime
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
Reference in New Issue
Block a user