validators.py 285 B

123456789101112131415161718
  1. from pydantic import BaseModel, EmailStr
  2. # Pydantic model for user registration
  3. class UserCreate(BaseModel):
  4. email: EmailStr
  5. password: str
  6. class UserLogin(BaseModel):
  7. email: EmailStr
  8. password: str
  9. class Token(BaseModel):
  10. access_token: str
  11. token_type: str