Import struttura base del progetto
This commit is contained in:
23
models/department.py
Normal file
23
models/department.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from models.location import Location
|
||||
|
||||
|
||||
class Department:
|
||||
def __init__(self, department_id: int, name: str, location: Location):
|
||||
self.__department_id = department_id
|
||||
self.__name = name
|
||||
self.__location = location
|
||||
|
||||
@property
|
||||
def department_id(self) -> int:
|
||||
return self.__department_id
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
return self.__name
|
||||
|
||||
@property
|
||||
def location_id(self) -> Location:
|
||||
return self.__location
|
||||
|
||||
def __str__(self):
|
||||
return f"Department({self.__department_id}, {self.__name}, {self.__location})"
|
||||
Reference in New Issue
Block a user