Skip to content

Commit aca8243

Browse files
Update Event model to make check-in time and location optional, enhancing flexibility in event data representation.
1 parent 3c0a171 commit aca8243

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

models/event.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
from pydantic import BaseModel
22
from datetime import datetime
3+
from typing import Optional
34

45
class Event(BaseModel):
56
order_id: int
67
product_id: int
78
product_name: str
89
date: datetime
9-
time_checkin: datetime
10-
checkin_latitude: float
11-
checkin_longitude: float
10+
time_checkin: Optional[datetime] = None
11+
checkin_latitude: Optional[float] = None
12+
checkin_longitude: Optional[float] = None
1213

0 commit comments

Comments
 (0)