123456789101112131415161718192021222324 |
- from typing import List, Optional
- from pydantic import BaseModel
- class ConstantBase(BaseModel):
- # 常量类型
- type: str
- # 常量值
- value: str
- class ConstantCreate(ConstantBase):
- class Config:
- schema_extra = {
- "example": {
- "type": "作业类型",
- "value": "textValue",
- }
- }
- class Constant(ConstantBase):
- id: int
- class Config:
- orm_mode = True
|