diff --git a/src/Entity/Hub.php b/src/Entity/Hub.php index 2d742b73..4e24ac0a 100644 --- a/src/Entity/Hub.php +++ b/src/Entity/Hub.php @@ -80,6 +80,18 @@ class Hub */ protected $payment_methods; + // flag if hub can be auto assigned + /** + * @ORM\Column(type="boolean") + */ + protected $flag_hub_auto_assign; + + // flag if riders assigned to hub can be auto assigned + /** + * @ORM\Column(type="boolean") + */ + protected $flag_rider_auto_assign; + public function __construct() { $this->time_open = new DateTime(); @@ -90,6 +102,8 @@ class Hub $this->flag_hub_view = false; $this->notif_number = ''; $this->payment_methods = new ArrayCollection(); + $this->flag_hub_auto_assign = false; + $this->flag_rider_auto_assign = false; } public function getRiders() @@ -232,4 +246,28 @@ class Hub $this->payment_methods = new ArrayCollection(); return $this; } + + public function setAutoAssignHubFlag($flag_hub_auto_assign = true) + { + $this->flag_hub_auto_assign = $flag_hub_auto_assign; + return $this; + } + + public function isAutoAssignHub() + { + return $this->flag_hub_auto_assign; + } + + public function setAutoAssignRiderFlag($flag_rider_auto_assign = true) + { + $this->flag_rider_auto_assign = $flag_rider_auto_assign; + return $this; + } + + public function isAutoAssignRider() + { + return $this->flag_rider_auto_assign; + } + + }