lnbits-legend/lnbits/extensions/usermanager/models.py
2021-04-21 14:02:52 +01:00

23 lines
368 B
Python

from typing import NamedTuple
from sqlite3 import Row
class Users(NamedTuple):
id: str
name: str
admin: str
email: str
password: str
class Wallets(NamedTuple):
id: str
admin: str
name: str
user: str
adminkey: str
inkey: str
@classmethod
def from_row(cls, row: Row) -> "Wallets":
return cls(**dict(row))