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