Add constants for job order status and job order service type
This commit is contained in:
parent
56a4fc7a9d
commit
e041623e9d
2 changed files with 35 additions and 1 deletions
34
src/Ramcar/JOStatus.php
Normal file
34
src/Ramcar/JOStatus.php
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
namespace App\Ramcar;
|
||||
|
||||
class JOStatus
|
||||
{
|
||||
const PENDING => 'pending';
|
||||
const ASSIGNED => 'assigned';
|
||||
const IN_PROGRESS => 'in_progress';
|
||||
const CANCELLED => 'cancelled';
|
||||
const FULFILLED => 'fulfilled';
|
||||
|
||||
const COLLECTION = [
|
||||
'pending' => 'Pending',
|
||||
'assigned' => 'Assigned',
|
||||
'in_progress' => 'In Progress',
|
||||
'cancelled' => 'Cancelled',
|
||||
'fulfilled' => 'Fulfilled',
|
||||
];
|
||||
|
||||
static public function getCollection()
|
||||
{
|
||||
return self::COLLECTION;
|
||||
}
|
||||
|
||||
static public function validate($type_text)
|
||||
{
|
||||
if (isset(self::COLLECTION[$type_text]))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@ class ServiceType
|
|||
];
|
||||
|
||||
|
||||
static public function getServiceTypes()
|
||||
static public function getCollection()
|
||||
{
|
||||
return self::COLLECTION;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue