Set all name value pair collections to extend from generic class

This commit is contained in:
Ramon Gutierrez 2018-01-31 13:35:10 +08:00
parent 196850f7b6
commit 034386aa59
3 changed files with 3 additions and 48 deletions

View file

@ -2,7 +2,7 @@
namespace App\Ramcar;
class ServiceType
class ServiceType extends NameValue
{
const BATTERY_REPLACEMENT_NEW = 'battery_new';
const BATTERY_REPLACEMENT_WARRANTY = 'battery_warranty';
@ -17,19 +17,4 @@ class ServiceType
'overheat' => 'Overheat Assistance',
'fuel' => 'Emergency Refuel',
];
static public function getCollection()
{
return self::COLLECTION;
}
static public function validate($type_text)
{
if (isset(self::COLLECTION[$type_text]))
return true;
return false;
}
}

View file

@ -2,7 +2,7 @@
namespace App\Ramcar;
class TicketStatus
class TicketStatus extends NameValue
{
const FILED = 'filed';
const ACKNOWLEDGED = 'acknowledged';
@ -13,19 +13,4 @@ class TicketStatus
'acknowledged' => 'Acknowledged',
'closed' => 'Closed',
];
static public function getCollection()
{
return self::COLLECTION;
}
static public function validate($type_text)
{
if (isset(self::COLLECTION[$type_text]))
return true;
return false;
}
}

View file

@ -2,7 +2,7 @@
namespace App\Ramcar;
class TicketType
class TicketType extends NameValue
{
const COMPLAINT = 'complaint';
const QUESTION = 'question';
@ -17,19 +17,4 @@ class TicketType
'billing' => 'Billing',
'other' => 'Other',
];
static public function getCollection()
{
return self::COLLECTION;
}
static public function validate($type_text)
{
if (isset(self::COLLECTION[$type_text]))
return true;
return false;
}
}