Total Complexity | 2 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class Entity extends Model |
||
9 | { |
||
10 | const COMMENT_ENABLE = 1; |
||
11 | const COMMENT_DISABLE = 0; |
||
12 | |||
13 | const INTERNAL_YES = 1; |
||
14 | const INTERNAL_NO = 0; |
||
15 | |||
16 | const CONTENT_MANAGE_YES = 1; |
||
17 | const CONTENT_MANAGE_NO = 0; |
||
18 | |||
19 | protected $guarded = []; |
||
20 | |||
21 | public static $listField = [ |
||
22 | 'name' => '名称', |
||
23 | 'table_name' => '数据库表名', |
||
24 | 'description' => '描述', |
||
25 | ]; |
||
26 | |||
27 | public function fields() |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * 限制查询外部模型 |
||
34 | * |
||
35 | * @return \Illuminate\Database\Eloquent\Builder |
||
36 | */ |
||
37 | public function scopeExternal($query) |
||
42 |