boilerplate for many objects
This commit is contained in:
38
models/event.py
Normal file
38
models/event.py
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
class Event:
|
||||
coordinates = []
|
||||
reviews = []
|
||||
category = []
|
||||
weather_requirements = 0
|
||||
|
||||
trip_to = ""
|
||||
trip_back = ""
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
def find_optimal_trip(self):
|
||||
pass
|
||||
|
||||
@property
|
||||
def trip_is_good(self):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
class Review:
|
||||
text = ""
|
||||
rating = 0 # max 5
|
||||
additional_photos = []
|
||||
|
||||
|
||||
def __init__(self, text, rating) -> None:
|
||||
self.text = text
|
||||
self.rating = rating
|
||||
|
||||
|
||||
def add_photo(self, photo):
|
||||
pass
|
||||
|
||||
|
@@ -1,19 +0,0 @@
|
||||
|
||||
|
||||
class User:
|
||||
name = ""
|
||||
event_preferences = []
|
||||
event_blacklist = []
|
||||
home_coordinates = []
|
||||
group_size = 0
|
||||
min_age = 0
|
||||
max_age = 0
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self.name = kwargs.pop("name")
|
||||
self.home_coordinates = kwargs.pop("home_coordinates")
|
||||
self.event_preferences = kwargs.pop("event_preferences")
|
||||
self.event_blacklist = kwargs.pop("name")
|
||||
self.group_size = kwargs.pop("group_size")
|
||||
self.min_age = kwargs.pop("min_age")
|
||||
self.max_age = kwargs.pop("max_age")
|
17
models/travel_route.py
Normal file
17
models/travel_route.py
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
|
||||
class TravelRoute:
|
||||
def __init__(self, start_coords, end_coords, ) -> None:
|
||||
pass
|
||||
|
||||
@property
|
||||
def duration(self):
|
||||
pass
|
||||
|
||||
@property
|
||||
def wait_time(self):
|
||||
pass
|
||||
|
||||
@property
|
||||
def eco_score(self):
|
||||
pass
|
@@ -0,0 +1,17 @@
|
||||
class User:
|
||||
name = ""
|
||||
event_preferences = []
|
||||
event_blacklist = []
|
||||
home_coordinates = []
|
||||
group_size = 0
|
||||
min_age = 0
|
||||
max_age = 0
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self.name = kwargs.pop("name")
|
||||
self.home_coordinates = kwargs.pop("home_coordinates")
|
||||
self.event_preferences = kwargs.pop("event_preferences")
|
||||
self.event_blacklist = kwargs.pop("name")
|
||||
self.group_size = kwargs.pop("group_size")
|
||||
self.min_age = kwargs.pop("min_age")
|
||||
self.max_age = kwargs.pop("max_age")
|
||||
|
Reference in New Issue
Block a user