aboutsummaryrefslogtreecommitdiff
path: root/lib/models/OERMaterialUser.php
blob: 9b4e1aa2829e11b58dd7d1952e7e92d46f0e3198 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

class OERMaterialUser extends SimpleORMap
{
    protected static function configure($config = [])
    {
        $config['db_table'] = 'oer_material_users';

        $config['belongs_to']['oeruser'] = [
            'class_name' => ExternalUser::class,
            'foreign_key' => 'user_id'
        ];

        $config['belongs_to']['material'] = [
            'class_name' => OERMaterial::class,
            'foreign_key' => 'material_id'
        ];
        parent::configure($config);
    }
}