lnbits-legend/lnbits/extensions/tpos/models.py
2021-10-06 19:43:57 +01:00

18 lines
341 B
Python

from sqlite3 import Row
from fastapi.param_functions import Query
from pydantic import BaseModel
class CreateTposData(BaseModel):
name: str
currency: str
class TPoS(BaseModel):
id: str
wallet: str
name: str
currency: str
@classmethod
def from_row(cls, row: Row) -> "TPoS":
return cls(**dict(row))