forked from ashishps1/awesome-low-level-design
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshow.py
38 lines (31 loc) · 926 Bytes
/
show.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from datetime import datetime
from typing import Dict
from movie import Movie
from theater import Theater
from seat import Seat
class Show:
def __init__(self, show_id: str, movie: Movie, theater: Theater, start_time: datetime, end_time: datetime, seats: Dict[str, Seat]):
self._id = show_id
self._movie = movie
self._theater = theater
self._start_time = start_time
self._end_time = end_time
self._seats = seats
@property
def id(self) -> str:
return self._id
@property
def movie(self) -> Movie:
return self._movie
@property
def theater(self) -> Theater:
return self._theater
@property
def start_time(self) -> datetime:
return self._start_time
@property
def end_time(self) -> datetime:
return self._end_time
@property
def seats(self) -> Dict[str, Seat]:
return self._seats