Initial monorepo structure
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
"""Auth schemas."""
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
from typing import Optional
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class TokenRequest(BaseModel):
|
||||
"""Token request schema."""
|
||||
|
||||
email: str
|
||||
password: str
|
||||
|
||||
|
||||
class TokenResponse(BaseModel):
|
||||
"""Token response schema."""
|
||||
|
||||
access_token: str
|
||||
token_type: str = "bearer"
|
||||
expires_in: int
|
||||
user: dict
|
||||
|
||||
|
||||
class UserRegisterRequest(BaseModel):
|
||||
"""User registration request schema."""
|
||||
|
||||
email: str
|
||||
password: str = Field(..., min_length=6)
|
||||
first_name: str = Field(..., min_length=1, max_length=100)
|
||||
last_name: str = Field(..., min_length=1, max_length=100)
|
||||
phone: Optional[str] = None
|
||||
role_id: Optional[int] = None
|
||||
Reference in New Issue
Block a user