mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-20 10:39:59 +01:00
6aef9bfd45
* WIP * styling * WIP * WIP * WIP * Clean up for PR * isort * hold abortContoller for a while longer
30 lines
534 B
Python
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
|