Skip to content

Commit 5250a28

Browse files
authored
Aggregate pattern applied to Location class
Modified the location class and added an update class to reflect changes in updates.
1 parent 1c7e4ae commit 5250a28

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/models.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,7 @@ class Location(BaseModel):
6969
country_population: int = None
7070
province: str = ""
7171
county: str = ""
72-
last_updated: str # TODO use datetime.datetime type.
7372
coordinates: Dict
74-
latest: Latest
75-
timelines: Timelines = {}
7673

7774

7875
class LocationResponse(BaseModel):
@@ -90,3 +87,8 @@ class LocationsResponse(BaseModel):
9087

9188
latest: Latest
9289
locations: List[Location] = []
90+
91+
class Updated(BaseModel):
92+
last_updated: str # TODO use datetime.datetime type.
93+
latest: Latest
94+
timelines: Timelines = {}

0 commit comments

Comments
 (0)