From 8619c493978dbaf71c9de36a9021859d21996d33 Mon Sep 17 00:00:00 2001 From: Korina Cordero Date: Wed, 8 Apr 2020 09:39:42 +0000 Subject: [PATCH] Add the status_open field in Hub. #374 --- src/Entity/Hub.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/Entity/Hub.php b/src/Entity/Hub.php index 03e0b202..f92a424e 100644 --- a/src/Entity/Hub.php +++ b/src/Entity/Hub.php @@ -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; + } + }