12345678910111213141516171819202122232425262728 |
- from typing import List, Optional
- from pydantic import BaseModel
- class ProgrammeBase(BaseModel):
- # 程序名称
- name: str
- class ProgrammeCreate(ProgrammeBase):
- # 密码
- password: str
- class Config:
- schema_extra = {
- "example": {
- "name": "test",
- "password": "test",
- }
- }
- class ProgrammeId(BaseModel):
- # 程序id
- programme_id: int
- class ProgrammeUpdate(ProgrammeId):
- # 密码
- password: str
|