Import struttura base del progetto

This commit is contained in:
Fabio Scotto di Santolo
2021-06-20 10:31:04 +02:00
parent c767a01a99
commit 2e1b532e5c
11 changed files with 443 additions and 0 deletions

23
models/department.py Normal file
View 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})"