Skip to content
Snippets Groups Projects
Select Git revision
  • af9ddb96ac0c8da287e4f712e60fc9fff15a769e
  • main default protected
  • studip-rector
  • ci-opt
  • course-members-export-as-word
  • data-vue-app
  • pipeline-improvements
  • webpack-optimizations
  • rector
  • icon-renewal
  • http-client-and-factories
  • jsonapi-atomic-operations
  • vueify-messages
  • tic-2341
  • 135-translatable-study-areas
  • extensible-sorm-action-parameters
  • sorm-configuration-trait
  • jsonapi-mvv-routes
  • docblocks-for-magic-methods
19 results

ConsultationEvent.php

Blame
  • Forked from Stud.IP / Stud.IP
    3544 commits behind, 42 commits ahead of the upstream repository.
    Jan-Hendrik Willms's avatar
    Jan-Hendrik Willms authored and Jan-Hendrik Willms committed
    Closes #982
    
    Merge request studip/studip!971
    af9ddb96
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    ConsultationEvent.php 1.03 KiB
    <?php
    /**
     * @author  Jan-Hendrik Willms <tleilax+studip@gmail.com>
     * @license GPL2 or any later version
     * @since   Stud.IP 5.1
     *
     * @property int slot_id database column
     * @property int id alias column for slot_id
     * @property string user_id database column
     * @property string event_id database column
     * @property int mkdate database column
     * @property ConsultationSlot slot belongs_to ConsultationSlot
     * @property EventData event belongs_to Event
     */
    class ConsultationEvent extends SimpleORMap
    {
        protected static function configure($config = [])
        {
            $config['db_table'] = 'consultation_events';
    
            $config['belongs_to']['slot'] = [
                'class_name'  => ConsultationSlot::class,
                'foreign_key' => 'slot_id',
            ];
            $config['has_one']['event'] = [
                'class_name'        => EventData::class,
                'foreign_key'       => 'event_id',
                'assoc_foreign_key' => 'event_id',
                'on_delete'         => 'delete',
            ];
    
            parent::configure($config);
        }
    }