define('NOTICE_INBOX_LIMIT', 1000);
define('NOTICE_INBOX_SOFT_LIMIT', 1000);
-class Notice_inbox extends Memcached_DataObject
+class Notice_inbox extends Managed_DataObject
{
###START_AUTOCODE
/* the code below is auto generated do not remove the above tag */
public $created; // datetime() not_null
public $source; // tinyint(1) default_1
- /* Static get */
- function staticGet($k,$v=null)
- { return Memcached_DataObject::staticGet('Notice_inbox',$k,$v); }
-
/* the code above is auto generated do not remove the tag below */
###END_AUTOCODE
- function stream($user_id, $offset, $limit, $since_id, $max_id, $own=false)
+ public static function schemaDef()
{
- throw new Exception('Notice_inbox no longer used; use Inbox');
+ return array(
+ 'description' => 'Obsolete; old entries here are converted to packed entries in the inbox table since 0.9',
+ 'fields' => array(
+ 'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'user receiving the message'),
+ 'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'notice received'),
+ 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date the notice was created'),
+ 'source' => array('type' => 'int', 'size' => 'tiny', 'default' => 1, 'description' => 'reason it is in the inbox, 1=subscription'),
+ ),
+ 'primary key' => array('user_id', 'notice_id'),
+ 'foreign keys' => array(
+ 'notice_inbox_user_id_fkey' => array('user', array('user_id' => 'id')),
+ 'notice_inbox_notice_id_fkey' => array('notice', array('notice_id' => 'id')),
+ ),
+ 'indexes' => array(
+ 'notice_inbox_notice_id_idx' => array('notice_id'),
+ ),
+ );
}
- function _streamDirect($user_id, $own, $offset, $limit, $since_id, $max_id)
+ function stream($user_id, $offset, $limit, $since_id, $max_id, $own=false)
{
throw new Exception('Notice_inbox no longer used; use Inbox');
}
- function &pkeyGet($kv)
+ function _streamDirect($user_id, $own, $offset, $limit, $since_id, $max_id)
{
- return Memcached_DataObject::pkeyGet('Notice_inbox', $kv);
+ throw new Exception('Notice_inbox no longer used; use Inbox');
}
static function gc($user_id)