File size: 400 Bytes
5111c4b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from pydantic import BaseModel, EmailStr, Field
from typing import Optional

class LoginRequest(BaseModel):
    email: EmailStr
    password: str = Field(..., min_length=6)

class LoginResponse(BaseModel):
    access_token: str
    token_type: str
    user: 'UserProfile'

class UserProfile(BaseModel):
    id: Optional[int] = None
    email: EmailStr
    full_name: str
    role: str