From 881a554a498f1e1c3ecd116747d8fe342b72ead9 Mon Sep 17 00:00:00 2001 From: Joshua Perry <45966243+jpez-development@users.noreply.github.com> Date: Sun, 5 Feb 2023 12:07:01 +0000 Subject: [PATCH] refactored --- jobs/Entity/Job.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jobs/Entity/Job.php b/jobs/Entity/Job.php index cfb4119..d8237de 100644 --- a/jobs/Entity/Job.php +++ b/jobs/Entity/Job.php @@ -10,13 +10,19 @@ class Job { public $categoryId; public $clientId; private $catsTable; + private $appsTable; - public function __construct(\jobs\JobDatabaseTable $catsTable) { + public function __construct(\jobs\JobDatabaseTable $catsTable, \jobs\JobDatabaseTable $appsTable) { $this->catsTable = $catsTable; + $this->appsTable = $appsTable; } public function getCat() { return $this->catsTable->find(['id'], ['value0' => $this->categoryId])[0]; } + + public function getApps() { + return $this->appsTable->find(['jobId'], ['value0' => $this->id]); + } } ?> \ No newline at end of file