]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Inbox.php
move core schema to class files
[quix0rs-gnu-social.git] / classes / Inbox.php
index 336bba048c983dbb6648b66c5450f96c8e32bf6b..6ba40df224f91f7c0e9a6ba4e3f78c5e86440f42 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;
@@ -47,6 +47,20 @@ class Inbox extends Memcached_DataObject
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
 
+    public static function schemaDef()
+    {
+        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')),
+            ),
+        );
+    }
+
     function sequenceKey()
     {
         return array(false, false, false);