Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phortune/storage/PhortuneProduct.php
Show All 21 Lines | final class PhortuneProduct extends PhortuneDAO | ||||
protected $metadata; | protected $metadata; | ||||
public function getConfiguration() { | public function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_SERIALIZATION => array( | self::CONFIG_SERIALIZATION => array( | ||||
'metadata' => self::SERIALIZATION_JSON, | 'metadata' => self::SERIALIZATION_JSON, | ||||
), | ), | ||||
self::CONFIG_COLUMN_SCHEMA => array( | |||||
'productName' => 'text255', | |||||
'productType' => 'text64', | |||||
'status' => 'text64', | |||||
'priceInCents' => 'sint64', | |||||
'billingIntervalInMonths' => 'uint32?', | |||||
'trialPeriodInDays' => 'uint32?', | |||||
), | |||||
self::CONFIG_KEY_SCHEMA => array( | |||||
'key_status' => array( | |||||
'columns' => array('status'), | |||||
), | |||||
), | |||||
) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
} | } | ||||
public function generatePHID() { | public function generatePHID() { | ||||
return PhabricatorPHID::generateNewPHID( | return PhabricatorPHID::generateNewPHID( | ||||
PhabricatorPHIDConstants::PHID_TYPE_PDCT); | PhabricatorPHIDConstants::PHID_TYPE_PDCT); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |