User::comments()   A
last analyzed

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 User extends \App\Model\Front\User
9
{
10
    public static $listField = [
11
        'phone' => '手机号',
12
        'statusText' => '状态'
13
    ];
14
15
    public static $searchField = [
16
        'phone' => '手机号'
17
    ];
18
19
    public function comments()
20
    {
21
        return $this->hasMany('App\Model\Admin\Comment', 'user_id');
22
    }
23
}
24