]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - classes/Group_inbox.php
Merge remote-tracking branch 'upstream/master' into social-master
[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     /* the code above is auto generated do not remove the tag below */
17     ###END_AUTOCODE
18
19     public static function schemaDef()
20     {
21         return array(
22             'description' => 'Many-many table listing notices posted to a given group, or which groups a given notice was posted to.',
23             'fields' => array(
24                 'group_id' => array('type' => 'int', 'not null' => true, 'description' => 'group receiving the message'),
25                 'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'notice received'),
26                 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date the notice was created'),
27             ),
28             'primary key' => array('group_id', 'notice_id'),
29             'foreign keys' => array(
30                 'group_inbox_group_id_fkey' => array('user_group', array('group_id' => 'id')),
31                 'group_inbox_notice_id_fkey' => array('notice', array('notice_id' => 'id')),
32             ),
33             'indexes' => array(
34                 'group_inbox_created_idx' => array('created'),
35                 'group_inbox_notice_id_idx' => array('notice_id'),
36                 'group_inbox_group_id_created_notice_id_idx' => array('group_id', 'created', 'notice_id'),
37             ),
38         );
39     }
40 }