Changeset View
Changeset View
Standalone View
Standalone View
src/applications/nuance/storage/NuanceItem.php
| Show All 11 Lines | final class NuanceItem | ||||
| protected $status; | protected $status; | ||||
| protected $ownerPHID; | protected $ownerPHID; | ||||
| protected $requestorPHID; | protected $requestorPHID; | ||||
| protected $sourcePHID; | protected $sourcePHID; | ||||
| protected $sourceLabel; | protected $sourceLabel; | ||||
| protected $data = array(); | protected $data = array(); | ||||
| protected $mailKey; | protected $mailKey; | ||||
| protected $dateNuanced; | protected $queuePHID; | ||||
| private $source = self::ATTACHABLE; | private $source = self::ATTACHABLE; | ||||
| public static function initializeNewItem() { | public static function initializeNewItem() { | ||||
| return id(new NuanceItem()) | return id(new NuanceItem()) | ||||
| ->setDateNuanced(time()) | |||||
| ->setStatus(self::STATUS_OPEN); | ->setStatus(self::STATUS_OPEN); | ||||
| } | } | ||||
| protected function getConfiguration() { | protected function getConfiguration() { | ||||
| return array( | return array( | ||||
| self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
| self::CONFIG_SERIALIZATION => array( | self::CONFIG_SERIALIZATION => array( | ||||
| 'data' => self::SERIALIZATION_JSON, | 'data' => self::SERIALIZATION_JSON, | ||||
| ), | ), | ||||
| self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
| 'ownerPHID' => 'phid?', | 'ownerPHID' => 'phid?', | ||||
| 'sourceLabel' => 'text255?', | 'sourceLabel' => 'text255?', | ||||
| 'status' => 'uint32', | 'status' => 'uint32', | ||||
| 'mailKey' => 'bytes20', | 'mailKey' => 'bytes20', | ||||
| 'dateNuanced' => 'epoch', | |||||
| ), | ), | ||||
| self::CONFIG_KEY_SCHEMA => array( | self::CONFIG_KEY_SCHEMA => array( | ||||
| 'key_source' => array( | 'key_source' => array( | ||||
| 'columns' => array('sourcePHID', 'status', 'dateNuanced', 'id'), | 'columns' => array('sourcePHID', 'status'), | ||||
| ), | ), | ||||
| 'key_owner' => array( | 'key_owner' => array( | ||||
| 'columns' => array('ownerPHID', 'status', 'dateNuanced', 'id'), | 'columns' => array('ownerPHID', 'status'), | ||||
| ), | ), | ||||
| 'key_contacter' => array( | 'key_requestor' => array( | ||||
| 'columns' => array('requestorPHID', 'status', 'dateNuanced', 'id'), | 'columns' => array('requestorPHID', 'status'), | ||||
| ), | |||||
| 'key_queue' => array( | |||||
| 'columns' => array('queuePHID', 'status'), | |||||
| ), | ), | ||||
| ), | ), | ||||
| ) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
| } | } | ||||
| public function generatePHID() { | public function generatePHID() { | ||||
| return PhabricatorPHID::generateNewPHID( | return PhabricatorPHID::generateNewPHID( | ||||
| NuanceItemPHIDType::TYPECONST); | NuanceItemPHIDType::TYPECONST); | ||||
| ▲ Show 20 Lines • Show All 79 Lines • ▼ Show 20 Lines | return array( | ||||
| 'id' => $this->getID(), | 'id' => $this->getID(), | ||||
| 'phid' => $this->getPHID(), | 'phid' => $this->getPHID(), | ||||
| 'ownerPHID' => $this->getOwnerPHID(), | 'ownerPHID' => $this->getOwnerPHID(), | ||||
| 'requestorPHID' => $this->getRequestorPHID(), | 'requestorPHID' => $this->getRequestorPHID(), | ||||
| 'sourcePHID' => $this->getSourcePHID(), | 'sourcePHID' => $this->getSourcePHID(), | ||||
| 'sourceLabel' => $this->getSourceLabel(), | 'sourceLabel' => $this->getSourceLabel(), | ||||
| 'dateCreated' => $this->getDateCreated(), | 'dateCreated' => $this->getDateCreated(), | ||||
| 'dateModified' => $this->getDateModified(), | 'dateModified' => $this->getDateModified(), | ||||
| 'dateNuanced' => $this->getDateNuanced(), | |||||
| ); | ); | ||||
| } | } | ||||
| /* -( PhabricatorApplicationTransactionInterface )------------------------- */ | /* -( PhabricatorApplicationTransactionInterface )------------------------- */ | ||||
| public function getApplicationTransactionEditor() { | public function getApplicationTransactionEditor() { | ||||
| Show All 18 Lines | |||||