| Total Complexity | 2 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 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 | protected $guarded = []; |
||
| 17 | |||
| 18 | public static $listField = [ |
||
| 19 | 'name' => '名称', |
||
| 20 | 'table_name' => '数据库表名', |
||
| 21 | 'description' => '描述', |
||
| 22 | ]; |
||
| 23 | |||
| 24 | public function fields() |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * 限制查询外部模型 |
||
| 31 | * |
||
| 32 | * @return \Illuminate\Database\Eloquent\Builder |
||
| 33 | */ |
||
| 34 | public function scopeExternal($query) |
||
| 39 |