X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FConfirm_address.php;h=0ed7796ad40b8458de85c6538d166ad4ee38b13d;hb=c5f6937f5ecfcb16ceb69a54247700cd28b23e48;hp=4b9bec64c63c4bbf5e37162766f905fed0a9c5c2;hpb=31b29fde50e9664e1b70064c043879ce87553883;p=quix0rs-gnu-social.git diff --git a/classes/Confirm_address.php b/classes/Confirm_address.php index 4b9bec64c6..0ed7796ad4 100644 --- a/classes/Confirm_address.php +++ b/classes/Confirm_address.php @@ -4,7 +4,7 @@ */ require_once INSTALLDIR.'/classes/Memcached_DataObject.php'; -class Confirm_address extends Memcached_DataObject +class Confirm_address extends Managed_DataObject { ###START_AUTOCODE /* the code below is auto generated do not remove the above tag */ @@ -19,15 +19,28 @@ class Confirm_address extends Memcached_DataObject public $sent; // datetime() public $modified; // timestamp() not_null default_CURRENT_TIMESTAMP - /* Static get */ - function staticGet($k,$v=null) - { return Memcached_DataObject::staticGet('Confirm_address',$k,$v); } - /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE - function sequenceKey() - { return array(false, false); } + public static function schemaDef() + { + return array( + 'fields' => array( + 'code' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'good random code'), + 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'user who requested confirmation'), + 'address' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'address (email, xmpp, SMS, etc.)'), + 'address_extra' => array('type' => 'varchar', 'length' => 255, 'not null' => true, 'description' => 'carrier ID, for SMS'), + 'address_type' => array('type' => 'varchar', 'length' => 8, 'not null' => true, 'description' => 'address type ("email", "xmpp", "sms")'), + 'claimed' => array('type' => 'datetime', 'description' => 'date this was claimed for queueing'), + 'sent' => array('type' => 'datetime', 'description' => 'date this was sent for queueing'), + 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'), + ), + 'primary key' => array('code'), + 'foreign keys' => array( + 'confirm_address_user_id_fkey' => array('user', array('user_id' => 'id')), + ), + ); + } static function getAddress($address, $addressType) {