diff options
| author | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2021-07-22 16:07:19 +0200 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2021-07-22 16:19:12 +0200 |
| commit | a3da1483a9e689846179159355badfec8073dbec (patch) | |
| tree | 770dcca6bdf5f6f2a11b0e7fcbbeda6919a3fc52 /lib/models/Courseware/BlockComment.php | |
current code from svn, revision 62608
Diffstat (limited to 'lib/models/Courseware/BlockComment.php')
| -rwxr-xr-x | lib/models/Courseware/BlockComment.php | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/models/Courseware/BlockComment.php b/lib/models/Courseware/BlockComment.php new file mode 100755 index 0000000..c985e89 --- /dev/null +++ b/lib/models/Courseware/BlockComment.php @@ -0,0 +1,44 @@ +<?php + +namespace Courseware; + +use User; + +/** + * Courseware's comments on blocks. + * + * @author Marcus Eibrink-Lunzenauer <lunzenauer@elan-ev.de> + * @author Till Glöggler <gloeggler@elan-ev.de> + * @author Ron Lucke <lucke@elan-ev.de> + * @license GPL2 or any later version + * + * @since Stud.IP 5.0 + * + * @property int $id database column + * @property int $block_id database column + * @property string $user_id database column + * @property string $comment database column + * @property int $mkdate database column + * @property int $chdate database column + * @property \User $user belongs_to User + * @property \Courseware\Block $block belongs_to Courseware\Block + */ +class BlockComment extends \SimpleORMap +{ + protected static function configure($config = []) + { + $config['db_table'] = 'cw_block_comments'; + + $config['belongs_to']['user'] = [ + 'class_name' => User::class, + 'foreign_key' => 'user_id', + ]; + + $config['belongs_to']['block'] = [ + 'class_name' => Block::class, + 'foreign_key' => 'block_id', + ]; + + parent::configure($config); + } +} |
