4 * Table Definition for group_inbox
6 class Group_inbox extends Managed_DataObject
9 /* the code below is auto generated do not remove the above tag */
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
16 /* the code above is auto generated do not remove the tag below */
19 public static function schemaDef()
22 'description' => 'Many-many table listing notices posted to a given group, or which groups a given notice was posted to.',
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'),
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')),
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'),