Working on a status gateway to get the ticket's default status
parent
31ced3f572
commit
c8485c0fa3
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: mkoch
|
||||
* Date: 2/15/2017
|
||||
* Time: 9:52 PM
|
||||
*/
|
||||
|
||||
namespace BusinessLogic\Statuses;
|
||||
|
||||
|
||||
class Closable {
|
||||
const YES = "yes";
|
||||
const STAFF_ONLY = "sonly";
|
||||
const CUSTOMERS_ONLY = "conly";
|
||||
const NO = "no";
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: mkoch
|
||||
* Date: 2/15/2017
|
||||
* Time: 9:46 PM
|
||||
*/
|
||||
|
||||
namespace BusinessLogic\Statuses;
|
||||
|
||||
|
||||
class DefaultStatusForAction {
|
||||
const NEW_TICKET = "IsNewTicketStatus";
|
||||
const CLOSED_STATUS = "IsClosed";
|
||||
const CLOSED_BY_CLIENT = "IsClosedByClient";
|
||||
const CUSTOMER_REPLY = "IsCustomerReplyStatus";
|
||||
const CLOSED_BY_STAFF = "IsStaffClosedOption";
|
||||
const REOPENED_BY_STAFF = "IsStaffReopenedStatus";
|
||||
const DEFAULT_STAFF_REPLY = "IsDefaultStaffReplyStatus";
|
||||
const LOCKED_TICKET = "LockedTicketStatus";
|
||||
const AUTOCLOSE_STATUS = "IsAutoCloseOption";
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace BusinessLogic\Statuses;
|
||||
|
||||
|
||||
class Status {
|
||||
/**
|
||||
* @var $id int
|
||||
*/
|
||||
public $id;
|
||||
|
||||
/**
|
||||
* @var $textColor string
|
||||
*/
|
||||
public $textColor;
|
||||
|
||||
/**
|
||||
* @var $defaultActions DefaultStatusForAction[]
|
||||
*/
|
||||
public $defaultActions;
|
||||
|
||||
/**
|
||||
* @var $closable Closable
|
||||
*/
|
||||
public $closable;
|
||||
|
||||
/**
|
||||
* @var $sort int
|
||||
*/
|
||||
public $sort;
|
||||
|
||||
/**
|
||||
* @var $name string[]
|
||||
*/
|
||||
public $localizedNames;
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace DataAccess\Statuses;
|
||||
|
||||
|
||||
use BusinessLogic\Statuses\DefaultStatusForAction;
|
||||
use BusinessLogic\Statuses\Status;
|
||||
|
||||
class StatusGateway {
|
||||
|
||||
/**
|
||||
* @param $defaultAction DefaultStatusForAction
|
||||
* @return Status
|
||||
*/
|
||||
function getStatusForDefaultAction($defaultAction) {
|
||||
//-- TODO
|
||||
return new Status();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue