27 lines
584 B
Python
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
|