department.py 331 B

123456789101112131415161718192021
  1. from pydantic import BaseModel
  2. from uuid import UUID
  3. class DepartmentCreate(BaseModel):
  4. campus_id: UUID
  5. name: str
  6. class DepartmentUpdate(BaseModel):
  7. campus_id: UUID
  8. name: str
  9. class DepartmentResponse(BaseModel):
  10. id: UUID
  11. campus_id: UUID
  12. name: str
  13. class Config:
  14. from_attributes = True