Merge pull request #543 from talvasconcelos/fix/tipjar

change namedtuple to basemodel
This commit is contained in:
Arc 2022-03-07 04:16:16 +00:00 committed by GitHub
commit 7088a3240f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
from sqlite3 import Row
from typing import NamedTuple, Optional
from typing import Optional
from fastapi.param_functions import Query
from pydantic import BaseModel
@ -26,7 +26,7 @@ class createTip(BaseModel):
message: str = ""
class Tip(NamedTuple):
class Tip(BaseModel):
"""A Tip represents a single donation"""
id: str # This ID always corresponds to a satspay charge ID
@ -55,7 +55,7 @@ class createTips(BaseModel):
message: str
class TipJar(NamedTuple):
class TipJar(BaseModel):
"""A TipJar represents a user's tip jar"""
id: int