Changeset View
Changeset View
Standalone View
Standalone View
src/applications/ponder/storage/PonderAnswer.php
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | final class PonderAnswer extends PonderDAO | ||||
public function getComments() { | public function getComments() { | ||||
return $this->comments; | return $this->comments; | ||||
} | } | ||||
public function getConfiguration() { | public function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_COLUMN_SCHEMA => array( | |||||
'voteCount' => 'sint32', | |||||
'content' => 'text', | |||||
'contentSource' => 'text', | |||||
), | |||||
self::CONFIG_KEY_SCHEMA => array( | |||||
'key_phid' => null, | |||||
'phid' => array( | |||||
'columns' => array('phid'), | |||||
'unique' => true, | |||||
), | |||||
'key_oneanswerperquestion' => array( | |||||
'columns' => array('questionID', 'authorPHID'), | |||||
'unique' => true, | |||||
), | |||||
'questionID' => array( | |||||
'columns' => array('questionID'), | |||||
), | |||||
'authorPHID' => array( | |||||
'columns' => array('authorPHID'), | |||||
), | |||||
), | |||||
) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
} | } | ||||
public function generatePHID() { | public function generatePHID() { | ||||
return PhabricatorPHID::generateNewPHID(PonderAnswerPHIDType::TYPECONST); | return PhabricatorPHID::generateNewPHID(PonderAnswerPHIDType::TYPECONST); | ||||
} | } | ||||
public function setContentSource(PhabricatorContentSource $content_source) { | public function setContentSource(PhabricatorContentSource $content_source) { | ||||
▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines |