Files
hr-resources/models/location.py
2021-06-20 10:31:04 +02:00

38 lines
1.1 KiB
Python

class Location:
def __init__(self, location_id: int, street_address: str, postal_code: str,
city: str, state_province: str, country_id: int):
self.__location_id = location_id
self.__street_address = street_address
self.__postal_code = postal_code
self.__city = city
self.__state_province = state_province
self.__country_id = country_id
@property
def location_id(self) -> int:
return self.__location_id
@property
def street_address(self) -> str:
return self.__street_address
@property
def postal_code(self) -> str:
return self.__postal_code
@property
def city(self) -> str:
return self.__city
@property
def state_province(self) -> str:
return self.__state_province
@property
def country_id(self) -> int:
return self.__country_id
def __str__(self):
return f"Location({self.__location_id}, {self.__postal_code}, " \
f"{self.__street_address}, {self.__city}, {self.__state_province}) "