lnbits-legend/lnbits/extensions/satspay/models.py
2021-03-31 23:49:36 +01:00

22 lines
No EOL
439 B
Python

from sqlite3 import Row
from typing import NamedTuple
class Charges(NamedTuple):
id: str
user: str
description: str
onchainwallet: str
onchainaddress: str
lnbitswallet: str
payment_request: str
payment_hash: str
webhook: str
time: str
amount: int
balance: int
paid: bool
timestamp: int
@classmethod
def from_row(cls, row: Row) -> "Payments":
return cls(**dict(row))