Created model for Key

This commit is contained in:
Gourav Kumar 2024-06-21 10:12:02 +05:30
parent 6e9a8b5b97
commit 926bd613a8

View File

@ -5,13 +5,20 @@ from pydantic import BaseModel
class User(BaseModel): class User(BaseModel):
id: int = None id: int = None
name: str = None
email: str = None
username: str username: str
password: str password: str
encryption_key: str = None
salt: str = None
created_on: str = datetime.datetime.now(datetime.timezone.utc).isoformat() created_on: str = datetime.datetime.now(datetime.timezone.utc).isoformat()
active: bool = True active: bool = True
class Key(BaseModel):
user_id: int
encryption_key: str
encryption_key_salt: str
class UserLogin(BaseModel): class UserLogin(BaseModel):
username: str username: str
password: str password: str