|
import scala.concurrent.Future |
|
|
|
case class Department(id: String, name: String, employeeIds: List[String]) |
|
|
|
case class Employee(id: String, name: String) |
|
|
|
case class DepartmentWithEmployees(departmentId: String, departmentName: String, employees: List[Employee]) |
|
|
|
object DepartmentService { |
|
def getDepartment(id: String): Future[Option[Department]] = ??? |
|
} |
|
|
|
object EmployeeService { |
|
def getEmployee(id: String): Future[Option[Employee]] = ??? |
|
} |
|
|
|
object DepartmentWithEmployeesService { |
|
def getDepartmentWithEmployees(departmentId: String): Future[Option[DepartmentWithEmployees]] = { |
|
// Implement this functionality using the above given functions |
|
} |
|
} |