barker/barker/barker/schemas/receive_payment.py

24 lines
412 B
Python

from decimal import Decimal
from typing import List
from pydantic import BaseModel
from . import to_camel
class ReceivePaymentItem(BaseModel):
id_: int
amount: Decimal
class Config:
fields = {"id_": "id"}
class ReceivePayment(BaseModel):
reason: str
amounts: List[ReceivePaymentItem]
class Config:
alias_generator = to_camel
anystr_strip_whitespace = True