Log.php 449 B

12345678910111213141516171819202122232425
  1. <?php
  2. App::uses('ToolsAppModel', 'Tools.Model');
  3. if (!defined('CLASS_USER')) {
  4. define('CLASS_USER', 'User');
  5. }
  6. /**
  7. * `logs` table populated by LogableBehavior
  8. */
  9. class Log extends ToolsAppModel {
  10. public $order = array('Log.created'=>'DESC');
  11. public $belongsTo = array(
  12. 'User' => array(
  13. 'className' => CLASS_USER,
  14. 'foreignKey' => 'user_id',
  15. 'conditions' => '',
  16. 'fields' => array('id', 'username'),
  17. 'order' => ''
  18. ),
  19. );
  20. }