You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
723 B
47 lines
723 B
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Entity extends Model
|
|
{
|
|
const nav = '';
|
|
|
|
const columns = [];
|
|
|
|
const searchFields = [];
|
|
|
|
const createFields = [];
|
|
|
|
const editFields = [];
|
|
|
|
/**
|
|
* 是否启用删除动作
|
|
* @var bool
|
|
*/
|
|
protected $isDelete = true;
|
|
|
|
/**
|
|
* 附加操作
|
|
* @var array
|
|
*/
|
|
protected $actions = [];
|
|
|
|
public function getIsDeleteAttribute()
|
|
{
|
|
return $this->isDelete;
|
|
}
|
|
|
|
public function getExtensionActionsAttribute()
|
|
{
|
|
return $this->actions;
|
|
}
|
|
|
|
public function getExtensionFields($extensionKey)
|
|
{
|
|
return $this->actions[$extensionKey]['fields'] ?? [];
|
|
}
|
|
|
|
}
|