Add constants for job order status and job order service type

This commit is contained in:
Kendrick Chan 2018-01-16 03:16:07 +08:00
parent 56a4fc7a9d
commit e041623e9d
2 changed files with 35 additions and 1 deletions

34
src/Ramcar/JOStatus.php Normal file
View 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;
}
}

View file

@ -17,7 +17,7 @@ class ServiceType
];
static public function getServiceTypes()
static public function getCollection()
{
return self::COLLECTION;
}