Init
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
from pydantic import BaseModel, ConfigDict, ValidationError, EmailStr
|
||||
import uuid
|
||||
|
||||
class UserResponse(BaseModel):
|
||||
username : str
|
||||
id : uuid.UUID
|
||||
email : EmailStr
|
||||
type : str
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
class CreateUserRequest(BaseModel):
|
||||
username : str
|
||||
email : EmailStr
|
||||
type : str
|
||||
password : str
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
class Token(BaseModel):
|
||||
access_token : str
|
||||
refresh_token : str
|
||||
token_type : str
|
||||
|
||||
|
||||
class TokenData(BaseModel):
|
||||
username : str
|
||||
scopes : list[str] = []
|
||||
Reference in New Issue
Block a user