Completed
Push — master ( 0487e7...b43f52 )
by Jianhua
03:47
created

Comment::replyUser()   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
    protected $guarded = [];
14
15
    public function user()
16
    {
17
        return $this->belongsTo('App\Model\Admin\User', 'user_id');
18
    }
19
20
    public function replyUser()
21
    {
22
        return $this->belongsTo('App\Model\Admin\User', 'reply_user_id');
23
    }
24
25
    public function adminUser()
26
    {
27
        return $this->belongsTo('App\Model\Admin\AdminUser', 'user_id');
28
    }
29
30
    public function entity()
31
    {
32
        return $this->belongsTo('App\Model\Admin\Entity', 'entity_id');
33
    }
34
}
35