Skip to content
Snippets Groups Projects
Select Git revision
  • b9c990dfe09cc63f687b6ba3dca080e5b71c04de
  • main default protected
  • step-3263
  • feature/plugins-cli
  • feature/vite
  • step-2484-peerreview
  • biest/issue-5051
  • tests/simplify-jsonapi-tests
  • fix/typo-in-1a70031
  • feature/broadcasting
  • database-seeders-and-factories
  • feature/peer-review-2
  • feature-feedback-jsonapi
  • feature/peerreview
  • feature/balloon-plus
  • feature/stock-images-unsplash
  • tic-2588
  • 5.0
  • 5.2
  • biest/unlock-blocks
  • biest-1514
21 results

BlubberMention.php

Blame
  • Forked from Stud.IP / Stud.IP
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    BlubberMention.php 1.09 KiB
    <?php
    /**
     * @author    Jan-Hendrik Willms <tleilax+studip@gmail.com>
     * @license   GPL2 or any later version
     * @since     4.5
     *
     * @property int $id alias column for mention_id
     * @property int $mention_id database column
     * @property string $thread_id database column
     * @property string $user_id database column
     * @property int $external_contact database column
     * @property int $mkdate database column
     * @property BlubberThread $thread belongs_to BlubberThread
     * @property User $user belongs_to User
     */
    
    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);
        }
    }