project.py 456 B

1234567891011121314151617181920212223
  1. from typing import List, Optional
  2. from pydantic import BaseModel
  3. class ProjectBase(BaseModel):
  4. # 项目名称
  5. name: str
  6. class ProjectCreate(ProjectBase):
  7. class Config:
  8. schema_extra = {
  9. "example": {
  10. "name": "blue_sky",
  11. }
  12. }
  13. class ProjectUpdate(ProjectBase):
  14. class Config:
  15. schema_extra = {
  16. "example": {
  17. "name": "blue_sky",
  18. }
  19. }