X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FOauth_token_association.php;h=ec5eae3064016b1778de2741278289034eae41cc;hb=fb94a16217bd7c944530442614dd9c00abf9d5e7;hp=66be22b5d3b7bc9b01b8390a691d57dadc971b67;hpb=93a8718f97c92b5e370335108aebf07d9004d5de;p=quix0rs-gnu-social.git diff --git a/classes/Oauth_token_association.php b/classes/Oauth_token_association.php index 66be22b5d3..ec5eae3064 100644 --- a/classes/Oauth_token_association.php +++ b/classes/Oauth_token_association.php @@ -4,7 +4,7 @@ */ require_once INSTALLDIR . '/classes/Memcached_DataObject.php'; -class Oauth_token_association extends Memcached_DataObject +class Oauth_token_association extends Managed_DataObject { ###START_AUTOCODE /* the code below is auto generated do not remove the above tag */ @@ -16,10 +16,6 @@ class Oauth_token_association extends Memcached_DataObject public $created; // datetime not_null public $modified; // timestamp not_null default_CURRENT_TIMESTAMP - /* Static get */ - function staticGet($k, $v = NULL) { - return Memcached_DataObject::staticGet('oauth_token_association', $k, $v); - } /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE @@ -39,4 +35,23 @@ class Oauth_token_association extends Memcached_DataObject return empty($result) ? null : $oau; } + + public static function schemaDef() + { + return array( + 'description' => 'Associate an application ID and profile ID with an OAuth token', + 'fields' => array( + 'profile_id' => array('type' => 'int', 'not null' => true, 'description' => 'associated user'), + 'application_id' => array('type' => 'int', 'not null' => true, 'description' => 'the application'), + 'token' => array('type' => 'varchar', 'length' => '255', 'not null' => true, 'description' => 'token used for this association'), + 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'), + 'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'), + ), + 'primary key' => array('profile_id', 'application_id', 'token'), + 'foreign keys' => array( + 'oauth_token_association_profile_fkey' => array('profile_id', array('profile' => 'id')), + 'oauth_token_association_application_fkey' => array('application_id', array('application' => 'id')), + ) + ); + } }