This is my Response model -
class BillBase(BaseModel):
bill_no: int
amount: int
about: str
class ShowSalesBill(BillBase):
id: int
left_amount: int
class Config:
orm_mode = True
so this left_amount
int field is not in the Bills model I want to calculate this field based on some condition. My question is can we get extra fields while getting responses from the response model as we have in the Django serializer we can get some custom data under the get_fiel_name
function there is something in FastAPI.