Add deleted outlet methods and field to hub entity #UAT

This commit is contained in:
Kendrick Chan 2018-03-11 03:17:53 +08:00
parent a7ffb58fc8
commit 98c92c9184

View file

@ -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;
}
}