Add the status_open field in Hub. #374
This commit is contained in:
parent
917459f228
commit
8619c49397
1 changed files with 18 additions and 0 deletions
|
|
@ -50,12 +50,19 @@ class Hub
|
||||||
*/
|
*/
|
||||||
protected $branch_code;
|
protected $branch_code;
|
||||||
|
|
||||||
|
// is hub open
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="boolean")
|
||||||
|
*/
|
||||||
|
protected $status_open;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->time_open = new DateTime();
|
$this->time_open = new DateTime();
|
||||||
$this->time_close = new DateTime();
|
$this->time_close = new DateTime();
|
||||||
$this->riders = new ArrayCollection();
|
$this->riders = new ArrayCollection();
|
||||||
$this->outlets = new ArrayCollection();
|
$this->outlets = new ArrayCollection();
|
||||||
|
$this->status_open = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRiders()
|
public function getRiders()
|
||||||
|
|
@ -132,4 +139,15 @@ class Hub
|
||||||
return $this->branch_code;
|
return $this->branch_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setStatusOpen($status = true)
|
||||||
|
{
|
||||||
|
$this->status_open = $status;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isStatusOpen()
|
||||||
|
{
|
||||||
|
return $this->status_open;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue