Student.php 730 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Student Model
  4. *
  5. * @package MicroMVC
  6. * @author David Pennington
  7. * @copyright (c) 2011 MicroMVC Framework
  8. * @license http://micromvc.com/license
  9. ********************************** 80 Columns *********************************
  10. */
  11. namespace Model;
  12. class Student extends \Micro\ORM
  13. {
  14. public static $table = 'student';
  15. public static $foreign_key = 'student_id';
  16. public static $cascade_delete = TRUE;
  17. public static $has = array(
  18. 'car' => '\Model\Car',
  19. 'memberships' => '\Model\Membership'
  20. );
  21. public static $belongs_to = array(
  22. 'dorm' => '\Model\Dorm',
  23. );
  24. public static $has_many_through = array(
  25. 'clubs' => array(
  26. 'student_id' => '\Model\Membership',
  27. 'club_id' => '\Model\Club'
  28. ),
  29. );
  30. }