]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Inbox.php
Qvitter API changes (thanks hannes2peer)
[quix0rs-gnu-social.git] / classes / Inbox.php
index 336bba048c983dbb6648b66c5450f96c8e32bf6b..630ed3ac41aa084791427ffba809c30af7279529 100644 (file)
@@ -29,7 +29,7 @@
 
 require_once INSTALLDIR.'/classes/Memcached_DataObject.php';
 
-class Inbox extends Memcached_DataObject
+class Inbox extends Managed_DataObject
 {
     const BOXCAR = 128;
     const MAX_NOTICES = 1024;
@@ -41,15 +41,21 @@ class Inbox extends Memcached_DataObject
     public $user_id;                         // int(4)  primary_key not_null
     public $notice_ids;                      // blob
 
-    /* Static get */
-    function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Inbox',$k,$v); }
-
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
 
-    function sequenceKey()
+    public static function schemaDef()
     {
-        return array(false, false, false);
+        return array(
+            'fields' => array(
+                'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'user receiving the notice'),
+                'notice_ids' => array('type' => 'blob', 'description' => 'packed list of notice ids'),
+            ),
+            'primary key' => array('user_id'),
+            'foreign keys' => array(
+                'inbox_user_id_fkey' => array('user', array('user_id' => 'id')),
+            ),
+        );
     }
 
     /**