Skip to content

Commit 23a5136

Browse files
committed
A stats class was created to implement aggregation
1 parent 1c7e4ae commit 23a5136

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

app/models.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@
33

44
from pydantic import BaseModel, validator
55

6-
6+
class Stats:
7+
confirmed: int
8+
deaths: int
9+
recovered: int
10+
711
class Latest(BaseModel):
812
"""
913
Latest model.
1014
"""
1115

12-
confirmed: int
13-
deaths: int
14-
recovered: int
16+
stats: Stats
1517

1618

1719
class LatestResponse(BaseModel):

0 commit comments

Comments
 (0)