| 1 |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
| 2 |
|
| 3 |
/* this file defines model relationships runtime if needed */ |
| 4 |
$CI =& ci_get_instance(); |
| 5 |
if( $CI->hc_modules->exists('notes') ) |
| 6 |
{ |
| 7 |
$config['note']['has_one']['timeoff'] = array( |
| 8 |
'class' => 'timeoff_model', |
| 9 |
'other_field' => 'note', |
| 10 |
); |
| 11 |
$config['note']['has_one']['shift'] = array( |
| 12 |
'class' => 'shift_model', |
| 13 |
'other_field' => 'note', |
| 14 |
); |
| 15 |
$config['timeoff']['has_many']['note'] = array( |
| 16 |
'class' => 'note_model', |
| 17 |
'other_field' => 'timeoff', |
| 18 |
); |
| 19 |
$config['shift']['has_many']['note'] = array( |
| 20 |
'class' => 'note_model', |
| 21 |
'other_field' => 'shift', |
| 22 |
); |
| 23 |
$config['user']['has_many']['note'] = array( |
| 24 |
'class' => 'note_model', |
| 25 |
'other_field' => 'author', |
| 26 |
); |
| 27 |
} |