6c86f0f571
- integrated request-module into module registry - moved backend into modules/request-module - added manifest.json and module.py - implemented dynamic router mounting - implemented dynamic static mounting - removed direct dependencies from platform core - verified startup with request-module - verified startup without request-module - added implementation_report_003.md
33 lines
708 B
Python
33 lines
708 B
Python
"""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
|