FastAuth/models.py
2024-06-10 20:40:22 +05:30

27 lines
584 B
Python

import datetime
from pydantic import BaseModel
class User(BaseModel):
id: int = None
username: str
password: str
encryption_key: str = None
salt: str = None
created_on: str = datetime.datetime.now(datetime.timezone.utc).isoformat()
active: bool = True
class UserLogin(BaseModel):
username: str
password: str
class Secret(BaseModel):
user_id: int = None
data: str
salt: str = None
notes: str = None
added_on: str = datetime.datetime.now(datetime.timezone.utc).isoformat()
modified_on: str = None
active: bool = True