19 lines
345 B
Python
19 lines
345 B
Python
from pydantic import BaseModel
|
|
|
|
from app.schemas.common import NaiveDatetime
|
|
|
|
|
|
class CreditRecordOut(BaseModel):
|
|
id: str
|
|
type: str
|
|
amount: float
|
|
description: str
|
|
created_at: NaiveDatetime
|
|
|
|
model_config = {"from_attributes": True}
|
|
|
|
|
|
class CreditBalanceOut(BaseModel):
|
|
credits: float
|
|
records: list[CreditRecordOut]
|