Group_inbox.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Table Definition for group_inbox
  4. */
  5. class Group_inbox extends Managed_DataObject
  6. {
  7. ###START_AUTOCODE
  8. /* the code below is auto generated do not remove the above tag */
  9. public $__table = 'group_inbox'; // table name
  10. public $group_id; // int(4) primary_key not_null
  11. public $notice_id; // int(4) primary_key not_null
  12. public $created; // datetime() not_null
  13. /* the code above is auto generated do not remove the tag below */
  14. ###END_AUTOCODE
  15. public static function schemaDef()
  16. {
  17. return array(
  18. 'description' => 'Many-many table listing notices posted to a given group, or which groups a given notice was posted to.',
  19. 'fields' => array(
  20. 'group_id' => array('type' => 'int', 'not null' => true, 'description' => 'group receiving the message'),
  21. 'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'notice received'),
  22. 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date the notice was created'),
  23. ),
  24. 'primary key' => array('group_id', 'notice_id'),
  25. 'foreign keys' => array(
  26. 'group_inbox_group_id_fkey' => array('user_group', array('group_id' => 'id')),
  27. 'group_inbox_notice_id_fkey' => array('notice', array('notice_id' => 'id')),
  28. ),
  29. 'indexes' => array(
  30. 'group_inbox_created_idx' => array('created'),
  31. 'group_inbox_notice_id_idx' => array('notice_id'),
  32. 'group_inbox_group_id_created_notice_id_idx' => array('group_id', 'created', 'notice_id'),
  33. ),
  34. );
  35. }
  36. }