feat: code quality
format add ci fixup ci
This commit is contained in:
parent
09bb033f85
commit
42b5edaf5d
26 changed files with 3199 additions and 295 deletions
28
models.py
28
models.py
|
|
@ -1,30 +1,24 @@
|
|||
# Data models for your extension
|
||||
|
||||
from sqlite3 import Row
|
||||
from typing import Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class CreateMyExtensionData(BaseModel):
|
||||
wallet: Optional[str]
|
||||
name: Optional[str]
|
||||
total: Optional[int]
|
||||
lnurlpayamount: Optional[int]
|
||||
lnurlwithdrawamount: Optional[int]
|
||||
ticker: Optional[int]
|
||||
name: str
|
||||
lnurlpayamount: int
|
||||
lnurlwithdrawamount: int
|
||||
wallet: Optional[str] = None
|
||||
total: int = 0
|
||||
|
||||
|
||||
class MyExtension(BaseModel):
|
||||
id: str
|
||||
wallet: Optional[str]
|
||||
name: Optional[str]
|
||||
total: Optional[int]
|
||||
lnurlpayamount: Optional[int]
|
||||
lnurlwithdrawamount: Optional[int]
|
||||
wallet: str
|
||||
lnurlpayamount: int
|
||||
name: str
|
||||
lnurlwithdrawamount: int
|
||||
total: int
|
||||
lnurlpay: Optional[str]
|
||||
lnurlwithdraw: Optional[str]
|
||||
ticker: Optional[int]
|
||||
|
||||
@classmethod
|
||||
def from_row(cls, row: Row) -> "MyExtension":
|
||||
return cls(**dict(row))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue