Files
railway_cloud/app/schemas/daily.py

23 lines
635 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from pydantic import BaseModel, Field
from typing import Optional
class LinecodeToDailyRequest(BaseModel):
"""通过水准线路编码生成 daily 数据的请求模型"""
linecode: str = Field(..., description="水准线路编码")
account_id: Optional[int] = Field(None, description="账户ID可选如果沉降数据中有")
class DailyDataResponse(BaseModel):
"""Daily 数据响应模型"""
id: int
user_id: int
account_id: int
point_id: Optional[str]
NYID: str
linecode: str
section_id: str
remaining: int
is_all: int
class Config:
from_attributes = True