student.py 389 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. from typing import List
  4. from pydantic import Field
  5. from pydantic.main import BaseModel
  6. from schemas.base import ListMixin
  7. class StudentItem(BaseModel):
  8. id: int
  9. sno: str
  10. name: str
  11. class_id: int
  12. class_name: str
  13. class Config:
  14. orm_mode = True
  15. class StudentList(ListMixin):
  16. data: List[StudentItem] = None