schoolclass.py 346 B

12345678910111213141516171819202122
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. from typing import List
  4. from pydantic.main import BaseModel
  5. from schemas.base import ListMixin
  6. class SchoolClassItem(BaseModel):
  7. id: int
  8. name: str
  9. student_amount: int
  10. class Config:
  11. orm_mode = True
  12. class SchoolClassList(ListMixin):
  13. data: List[SchoolClassItem] = []