aboutsummaryrefslogtreecommitdiff
path: root/lib/models/BlubberMention.php
blob: c2a5008d2daa6564eff3b450a25352b3d01c46c0 (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
<?php
/**
 * @author    Jan-Hendrik Willms <tleilax+studip@gmail.com>
 * @license   GPL2 or any later version
 * @since     4.5
 */

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

        $config['belongs_to']['thread'] = [
            'class_name'        => BlubberThread::class,
            'foreign_key'       => 'thread_id',
            'assoc_foreign_key' => 'thread_id',
        ];
        $config['belongs_to']['user'] = [
            'class_name'        => User::class,
            'foreign_key'       => 'user_id',
            'assoc_foreign_key' => 'user_id',
        ];

        parent::configure($config);
    }
}