2021-10-06 14:49:00 +01:00
|
|
|
from sqlite3 import Row
|
2022-07-25 10:19:03 +01:00
|
|
|
from typing import Optional
|
2021-10-18 10:58:09 +01:00
|
|
|
|
2022-07-25 10:19:03 +01:00
|
|
|
from fastapi import Query
|
2021-10-06 19:43:57 +01:00
|
|
|
from pydantic import BaseModel
|
2021-10-06 14:49:00 +01:00
|
|
|
|
|
|
|
|
2021-10-06 19:43:57 +01:00
|
|
|
class CreateTposData(BaseModel):
|
|
|
|
name: str
|
|
|
|
currency: str
|
2022-07-25 10:19:03 +01:00
|
|
|
tip_options: str = Query(None)
|
|
|
|
tip_wallet: str = Query(None)
|
2021-10-06 19:43:57 +01:00
|
|
|
|
2021-10-17 18:33:29 +01:00
|
|
|
|
2021-10-06 19:43:57 +01:00
|
|
|
class TPoS(BaseModel):
|
2021-10-06 14:49:00 +01:00
|
|
|
id: str
|
|
|
|
wallet: str
|
|
|
|
name: str
|
|
|
|
currency: str
|
2022-07-25 10:19:03 +01:00
|
|
|
tip_options: Optional[str]
|
|
|
|
tip_wallet: Optional[str]
|
2021-10-06 14:49:00 +01:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def from_row(cls, row: Row) -> "TPoS":
|
|
|
|
return cls(**dict(row))
|
2022-08-15 07:37:10 -06:00
|
|
|
|
|
|
|
|
|
|
|
class PayLnurlWData(BaseModel):
|
|
|
|
lnurl: str
|