lnbits-legend/lnbits/extensions/tpos/models.py
Lee Salminen 6aef9bfd45
Add NFC support to TPOS Extension (#856)
* WIP

* styling

* WIP

* WIP

* WIP

* Clean up for PR

* isort

* hold abortContoller for a while longer
2022-08-15 15:37:10 +02:00

30 lines
534 B
Python

from sqlite3 import Row
from typing import Optional
from fastapi import Query
from pydantic import BaseModel
class CreateTposData(BaseModel):
name: str
currency: str
tip_options: str = Query(None)
tip_wallet: str = Query(None)
class TPoS(BaseModel):
id: str
wallet: str
name: str
currency: str
tip_options: Optional[str]
tip_wallet: Optional[str]
@classmethod
def from_row(cls, row: Row) -> "TPoS":
return cls(**dict(row))
class PayLnurlWData(BaseModel):
lnurl: str