Total Complexity | 1 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class EntityField extends Model |
||
9 | { |
||
10 | const SHOW_ENABLE = 1; |
||
11 | const SHOW_DISABLE = 0; |
||
12 | |||
13 | const SHOW_INLINE = 1; |
||
14 | const SHOW_NOT_INLINE = 0; |
||
15 | |||
16 | const EDIT_ENABLE = 1; |
||
17 | const EDIT_DISABLE = 0; |
||
18 | |||
19 | const REQUIRED_ENABLE = 1; |
||
20 | const REQUIRED_DISABLE = 0; |
||
21 | |||
22 | protected $guarded = []; |
||
23 | |||
24 | public function entity() |
||
27 | } |
||
28 | |||
29 | public static $listField = [ |
||
30 | 'entityName' => '模型', |
||
31 | 'name' => '字段名称', |
||
32 | 'type' => '字段类型', |
||
33 | 'form_name' => '表单名称', |
||
34 | 'form_type' => ['title' => '表单类型', 'sort' => true], |
||
35 | 'is_show_inline' => [ |
||
36 | 'title' => '行内展示', 'sort' => true, 'templet' => '#isShowInlineTemplet', 'event' => 'showInlineEvent' |
||
37 | ], |
||
38 | 'is_show' => ['title' => '显示', 'templet' => '#isShowTemplet', 'event' => 'showEvent'], |
||
39 | 'order' => ['title' => '排序', 'sort' => true, 'edit' => true, 'width' => 80], |
||
40 | ]; |
||
41 | |||
42 | public static $searchField = [ |
||
43 | 'name' => '字段名称', |
||
44 | 'entity_id' => [ |
||
45 | 'title' => '模型', |
||
46 | 'searchType' => '=', |
||
47 | 'showType' => 'select', |
||
48 | 'enums' => [], |
||
49 | ] |
||
52 |