mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-23 22:47:05 +01:00
change namedtuple to basemodel
This commit is contained in:
parent
c58e2c5d74
commit
e82ce89e9a
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
from sqlite3 import Row
|
from sqlite3 import Row
|
||||||
from typing import NamedTuple, Optional
|
from typing import Optional
|
||||||
|
|
||||||
from fastapi.param_functions import Query
|
from fastapi.param_functions import Query
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
@ -26,7 +26,7 @@ class createTip(BaseModel):
|
||||||
message: str = ""
|
message: str = ""
|
||||||
|
|
||||||
|
|
||||||
class Tip(NamedTuple):
|
class Tip(BaseModel):
|
||||||
"""A Tip represents a single donation"""
|
"""A Tip represents a single donation"""
|
||||||
|
|
||||||
id: str # This ID always corresponds to a satspay charge ID
|
id: str # This ID always corresponds to a satspay charge ID
|
||||||
|
@ -55,7 +55,7 @@ class createTips(BaseModel):
|
||||||
message: str
|
message: str
|
||||||
|
|
||||||
|
|
||||||
class TipJar(NamedTuple):
|
class TipJar(BaseModel):
|
||||||
"""A TipJar represents a user's tip jar"""
|
"""A TipJar represents a user's tip jar"""
|
||||||
|
|
||||||
id: int
|
id: int
|
||||||
|
|
Loading…
Add table
Reference in a new issue