2021-10-06 14:49:00 +01:00
|
|
|
from sqlite3 import Row
|
2021-10-18 10:58:09 +01:00
|
|
|
|
2021-10-06 19:43:57 +01:00
|
|
|
from pydantic import BaseModel
|
2021-10-06 14:49:00 +01:00
|
|
|
|
|
|
|
|
2021-10-06 19:43:57 +01:00
|
|
|
class CreateTposData(BaseModel):
|
|
|
|
name: str
|
|
|
|
currency: str
|
2022-07-02 21:16:27 -06:00
|
|
|
tip_options: str
|
|
|
|
tip_wallet: str
|
2021-10-06 19:43:57 +01:00
|
|
|
|
2021-10-17 18:33:29 +01:00
|
|
|
|
2021-10-06 19:43:57 +01:00
|
|
|
class TPoS(BaseModel):
|
2021-10-06 14:49:00 +01:00
|
|
|
id: str
|
|
|
|
wallet: str
|
|
|
|
name: str
|
|
|
|
currency: str
|
2022-07-02 21:16:27 -06:00
|
|
|
tip_options: str
|
|
|
|
tip_wallet: str
|
2021-10-06 14:49:00 +01:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def from_row(cls, row: Row) -> "TPoS":
|
|
|
|
return cls(**dict(row))
|