splitpayments/models.py
dni ⚡ 5042d40af6
feat: update to lnbits 1.0.0 (#27)
* feat: update to lnbits 1.0.0
* fix select wallet
* fix splits
* fix: types, postgres errors with cache
---------

Co-authored-by: Tiago Vasconcelos <talvasconcelos@gmail.com>
2024-11-28 12:28:00 +01:00

22 lines
403 B
Python

from typing import Optional
from fastapi import Query
from pydantic import BaseModel
class Target(BaseModel):
id: str
wallet: str
source: str
percent: float
alias: Optional[str] = None
class TargetPut(BaseModel):
wallet: str = Query(...)
alias: str = Query("")
percent: float = Query(..., ge=0, le=100)
class TargetPutList(BaseModel):
targets: list[TargetPut]