Created model for Key
This commit is contained in:
parent
6e9a8b5b97
commit
926bd613a8
11
models.py
11
models.py
@ -5,13 +5,20 @@ from pydantic import BaseModel
|
||||
|
||||
class User(BaseModel):
|
||||
id: int = None
|
||||
name: str = None
|
||||
email: str = 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 Key(BaseModel):
|
||||
user_id: int
|
||||
encryption_key: str
|
||||
encryption_key_salt: str
|
||||
|
||||
|
||||
class UserLogin(BaseModel):
|
||||
username: str
|
||||
password: str
|
||||
|
Loading…
Reference in New Issue
Block a user