]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - classes/Group_inbox.php
Merge commit 'refs/merge-requests/158' of git://gitorious.org/statusnet/mainline...
[quix0rs-gnu-social.git] / classes / Group_inbox.php
1 <?php
2
3 /**
4  * Table Definition for group_inbox
5  */
6 class Group_inbox extends Managed_DataObject
7 {
8     ###START_AUTOCODE
9     /* the code below is auto generated do not remove the above tag */
10
11     public $__table = 'group_inbox';                     // table name
12     public $group_id;                        // int(4)  primary_key not_null
13     public $notice_id;                       // int(4)  primary_key not_null
14     public $created;                         // datetime()   not_null
15
16     /* Static get */
17
18     function staticGet($k,$v=NULL) { return Memcached_DataObject::staticGet('Group_inbox',$k,$v); }
19
20     /* the code above is auto generated do not remove the tag below */
21     ###END_AUTOCODE
22
23     public static function schemaDef()
24     {
25         return array(
26             'description' => 'Many-many table listing notices posted to a given group, or which groups a given notice was posted to.',
27             'fields' => array(
28                 'group_id' => array('type' => 'int', 'not null' => true, 'description' => 'group receiving the message'),
29                 'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'notice received'),
30                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date the notice was created'),
31             ),
32             'primary key' => array('group_id', 'notice_id'),
33             'foreign keys' => array(
34                 'group_inbox_group_id_fkey' => array('user_group', array('group_id' => 'id')),
35                 'group_inbox_notice_id_fkey' => array('notice', array('notice_id' => 'id')),
36             ),
37             'indexes' => array(
38                 'group_inbox_created_idx' => array('created'),
39                 'group_inbox_notice_id_idx' => array('notice_id'),
40             ),
41         );
42     }
43
44     function pkeyGet($kv)
45     {
46         return Memcached_DataObject::pkeyGet('Group_inbox', $kv);
47     }
48 }