FastAuth/models.py
2024-06-13 23:24:14 +05:30

26 lines
560 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):
id: int = None
user_id: int = None
data: str
added_on: str = datetime.datetime.now(datetime.timezone.utc).isoformat()
modified_on: str = None
active: bool = True