Add the status_open field in Hub. #374

This commit is contained in:
Korina Cordero 2020-04-08 09:39:42 +00:00
parent 917459f228
commit 8619c49397

View file

@ -50,12 +50,19 @@ class Hub
*/
protected $branch_code;
// is hub open
/**
* @ORM\Column(type="boolean")
*/
protected $status_open;
public function __construct()
{
$this->time_open = new DateTime();
$this->time_close = new DateTime();
$this->riders = new ArrayCollection();
$this->outlets = new ArrayCollection();
$this->status_open = true;
}
public function getRiders()
@ -132,4 +139,15 @@ class Hub
return $this->branch_code;
}
public function setStatusOpen($status = true)
{
$this->status_open = $status;
return $this;
}
public function isStatusOpen()
{
return $this->status_open;
}
}