blob: 643e5648d03c24d878ecb090d23bf814966cd34a (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
<?php
namespace Forum;
use SimpleORMap;
use User;
/**
* @property int $id
* @property string $posting_id
* @property string $user_id
* @property string $emoji
* @property int $mkdate
* @property int $chdate
*
* @property Posting $posting
* @property User $user
*/
class PostingReaction extends SimpleORMap
{
public const thumbUp = 'THUMBS UP SIGN';
public const thumbDown = 'THUMBS DOWN SIGN';
public const rocket = 'ROCKET';
public const grinningFace = 'GRINNING FACE';
public const sunglasses = 'SMILING FACE WITH SUNGLASSES';
public const confused = 'CONFUSED FACE';
public const heart = 'BLACK HEART SUIT';
public const party = 'PARTY POPPER';
protected static function configure($config = [])
{
$config['db_table'] = 'forum_posting_reactions';
$config['belongs_to']['posting'] = [
'class_name' => Posting::class,
'foreign_key' => 'posting_id',
'assoc_foreign_key' => 'posting_id'
];
$config['belongs_to']['user'] = [
'class_name' => User::class,
'foreign_key' => 'user_id',
'assoc_foreign_key' => 'user_id'
];
parent::configure($config);
}
}
|