Coverage for app / schemas / donation.py: 100%
20 statements
« prev ^ index » next coverage.py v7.13.3, created at 2026-02-04 06:09 -0500
« prev ^ index » next coverage.py v7.13.3, created at 2026-02-04 06:09 -0500
1"""Donation schemas."""
2from datetime import datetime
3from typing import Optional, List
4from pydantic import BaseModel, Field
7class DonationResponse(BaseModel):
8 id: str
9 campaign_id: str
10 chain: str
11 tx_hash: str
12 amount_smallest_unit: int
13 from_address: Optional[str] = None
14 confirmed_at: datetime
15 block_number: Optional[int] = None
16 created_at: datetime
18 class Config:
19 from_attributes = True
22class DonationListResponse(BaseModel):
23 donations: List[DonationResponse]
24 total: int
25 page: int
26 per_page: int