lnbits-legend/lnbits/extensions/splitpayments/models.py

24 lines
437 B
Python
Raw Normal View History

2021-10-18 19:39:35 +01:00
from typing import List, Optional
from fastapi.param_functions import Query
2021-10-18 12:34:45 +01:00
from pydantic import BaseModel
class Target(BaseModel):
wallet: str
source: str
percent: float
2022-12-13 20:01:05 +00:00
tag: str
2021-10-18 19:39:35 +01:00
alias: Optional[str]
2021-10-18 12:34:45 +01:00
2021-11-12 04:14:55 +00:00
2021-10-18 12:34:45 +01:00
class TargetPutList(BaseModel):
2021-10-18 19:39:35 +01:00
wallet: str = Query(...)
alias: str = Query("")
2022-12-13 20:01:05 +00:00
percent: float = Query(..., ge=0, lt=100)
2022-12-13 23:41:40 +00:00
tag: str
2021-10-18 12:34:45 +01:00
class TargetPut(BaseModel):
2021-10-18 19:39:35 +01:00
__root__: List[TargetPutList]