-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplace.py
executable file
·36 lines (32 loc) · 975 Bytes
/
place.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
#!/bin/usr/env python3
"""class Place is defined here to inherit from BaseModel"""
import models
from models.base_model import BaseModel
class Place(BaseModel):
"""
class Place inherit from BaseModel
Arguments:
city_id: string - empty string: it will be the City.id
user_id: string - empty string: it will be the User.id
name: string - empty string
description: string - empty string
number_rooms: integer - 0
number_bathrooms: integer - 0
max_guest: integer - 0
price_by_night: integer - 0
latitude: float - 0.0
longitude: float - 0.0
amenity_ids = list of string - empty list: it will be the list of
Amenity.id later
"""
city_id = ""
user_id = ""
name = ""
description = ""
number_rooms = 0
number_bathrooms = 0
max_guest = 0
price_by_night = 0
latitude = 0.0
longitude = 0.0
amenity_ids = []