mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-25 23:21:21 +01:00
21 lines
414 B
Python
21 lines
414 B
Python
from typing import List, Optional
|
|
|
|
from fastapi.param_functions import Query
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class Target(BaseModel):
|
|
wallet: str
|
|
source: str
|
|
percent: float
|
|
alias: Optional[str]
|
|
|
|
|
|
class TargetPutList(BaseModel):
|
|
wallet: str = Query(...)
|
|
alias: str = Query("")
|
|
percent: float = Query(..., ge=0.01, lt=100)
|
|
|
|
|
|
class TargetPut(BaseModel):
|
|
__root__: List[TargetPutList]
|