Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phriction/storage/PhrictionDocument.php
Show All 18 Lines | final class PhrictionDocument extends PhrictionDAO | ||||
// TODO: This should be `self::ATTACHABLE`, but there are still a lot of call | // TODO: This should be `self::ATTACHABLE`, but there are still a lot of call | ||||
// sites which load PhrictionDocuments directly. | // sites which load PhrictionDocuments directly. | ||||
private $project = null; | private $project = null; | ||||
public function getConfiguration() { | public function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_TIMESTAMPS => false, | self::CONFIG_TIMESTAMPS => false, | ||||
self::CONFIG_COLUMN_SCHEMA => array( | |||||
'slug' => 'text128', | |||||
'depth' => 'uint32', | |||||
'contentID' => 'id?', | |||||
'status' => 'uint32', | |||||
), | |||||
self::CONFIG_KEY_SCHEMA => array( | |||||
'key_phid' => null, | |||||
'phid' => array( | |||||
'columns' => array('phid'), | |||||
'unique' => true, | |||||
), | |||||
'slug' => array( | |||||
'columns' => array('slug'), | |||||
'unique' => true, | |||||
), | |||||
'depth' => array( | |||||
'columns' => array('depth', 'slug'), | |||||
'unique' => true, | |||||
), | |||||
), | |||||
) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
} | } | ||||
public function generatePHID() { | public function generatePHID() { | ||||
return PhabricatorPHID::generateNewPHID( | return PhabricatorPHID::generateNewPHID( | ||||
PhrictionDocumentPHIDType::TYPECONST); | PhrictionDocumentPHIDType::TYPECONST); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 172 Lines • Show Last 20 Lines |