Add files via upload
This commit is contained in:
parent
762ac58daf
commit
aa560fd89d
17 changed files with 2948 additions and 2 deletions
24
models.py
Normal file
24
models.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
from sqlite3 import Row
|
||||
from typing import Optional, List
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class CreateTempData(BaseModel):
|
||||
wallet: Optional[str]
|
||||
name: Optional[str]
|
||||
total: Optional[int]
|
||||
|
||||
class Temp(BaseModel):
|
||||
id: str
|
||||
wallet: str
|
||||
name: str
|
||||
total: Optional[int]
|
||||
|
||||
@classmethod
|
||||
def from_row(cls, row: Row) -> "Temp":
|
||||
return cls(**dict(row))
|
||||
|
||||
class CreateUpdateItemData(BaseModel):
|
||||
items: List[Item]
|
||||
|
||||
# add something lnurly
|
||||
Loading…
Add table
Add a link
Reference in a new issue