aboutsummaryrefslogtreecommitdiff
path: root/lib/models/MvvOverlappingExclude.php
blob: d199e3040b51a41e89f5b2c4e20cba3c76c2a0c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php

/**
 * MvvOverlappingExclude.class.php - model class for table mvv_ovl_excludes
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of
 * the License, or (at your option) any later version.
 *
 * @author      Peter Thienel <thienel@data-quest.de>
 * @copyright   2018 Stud.IP Core-Group
 * @license     http://www.gnu.org/licenses/gpl-2.0.html GPL version 2
 * @category    Stud.IP
 * @since       4.4
 *
 * @property array $id alias for pk
 * @property string $selection_id database column
 * @property string $course_id database column
 * @property int|null $mkdate database column
 * @property int|null $chdate database column
 * @property MvvOverlappingSelection $selection belongs_to MvvOverlappingSelection
 * @property Course $course belongs_to Course
 */

class MvvOverlappingExclude extends SimpleORMap
{
    /**
     * Configures the model.
     *
     * @param array  $config Configuration
     */
    protected static function configure($config = array()) {

        $config['db_table'] = 'mvv_ovl_excludes';
        $config['belongs_to']['selection'] = [
            'class_name'  => MvvOverlappingSelection::class,
            'foreign_key' => 'selection_id'
        ];
        $config['belongs_to']['course'] = [
            'class_name'  => Course::class,
            'foreign_key' => 'course_id'
        ];

        parent::configure($config);
    }

}