Completed
Push — master ( c785b5...4c9a25 )
by Jianhua
04:17
created

Comment::adminUser()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * @author  Eddy <[email protected]>
4
 */
5
6
namespace App\Model\Admin;
7
8
class Comment extends Model
9
{
10
    const STATUS_ENABLE = 1;
11
    const STATUS_DISABLE = 0;
12
13
    const ADMIN_YES = 1;
14
    const ADMIN_NO = 0;
15
16
    protected $guarded = [];
17
18
    public function user()
19
    {
20
        return $this->belongsTo('App\Model\Admin\User', 'user_id');
21
    }
22
23
    public function replyUser()
24
    {
25
        return $this->belongsTo('App\Model\Admin\User', 'reply_user_id');
26
    }
27
28
    public function entity()
29
    {
30
        return $this->belongsTo('App\Model\Admin\Entity', 'entity_id');
31
    }
32
}
33