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

Comment   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A entity() 0 3 1
A user() 0 3 1
A replyUser() 0 3 1
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