admin.py 1009 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # from beanie import Document
  2. # from fastapi.security import HTTPBasicCredentials
  3. # from pydantic import BaseModel, EmailStr
  4. # class Admin(Document):
  5. # fullname: str
  6. # email: EmailStr
  7. # password: str
  8. # class Config:
  9. # json_schema_extra = {
  10. # "example": {
  11. # "fullname": "Abdulazeez Abdulazeez Adeshina",
  12. # "email": "abdul@youngest.dev",
  13. # "password": "3xt3m#",
  14. # }
  15. # }
  16. # class Settings:
  17. # name = "admin"
  18. # class AdminSignIn(HTTPBasicCredentials):
  19. # class Config:
  20. # json_schema_extra = {
  21. # "example": {"username": "abdul@youngest.dev", "password": "3xt3m#"}
  22. # }
  23. # class AdminData(BaseModel):
  24. # fullname: str
  25. # email: EmailStr
  26. # class Config:
  27. # json_schema_extra = {
  28. # "example": {
  29. # "fullname": "Abdulazeez Abdulazeez Adeshina",
  30. # "email": "abdul@youngest.dev",
  31. # }
  32. # }