2024-06-10 15:10:22 +00:00
|
|
|
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):
|
2024-06-13 17:54:14 +00:00
|
|
|
id: int = None
|
2024-06-10 15:10:22 +00:00
|
|
|
user_id: int = None
|
|
|
|
data: str
|
|
|
|
added_on: str = datetime.datetime.now(datetime.timezone.utc).isoformat()
|
|
|
|
modified_on: str = None
|
|
|
|
active: bool = True
|