diff --git a/src/Entity/Hub.php b/src/Entity/Hub.php index 4e4d9b1d..53200b80 100644 --- a/src/Entity/Hub.php +++ b/src/Entity/Hub.php @@ -34,6 +34,12 @@ class Hub */ protected $users; + // hub outlets + /** + * @ORM\OneToMany(targetEntity="Outlet", mappedBy="hub") + */ + protected $outlets; + public function __construct() { $this->time_open = new DateTime(); @@ -61,4 +67,15 @@ class Hub { return $this->job_orders; } + + public function addOutlet(Outlet $outlet) + { + $this->outlets[] = $outlet; + return $this; + } + + public function getOutlets() + { + return $this->outlets; + } }