|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Sco\Admin\Models; |
|
4
|
|
|
|
|
5
|
|
|
use Zizaco\Entrust\EntrustPermission; |
|
6
|
|
|
|
|
7
|
|
|
/** |
|
8
|
|
|
* Sco\Admin\Models\Permission |
|
9
|
|
|
* |
|
10
|
|
|
* @property int $id 主键 |
|
11
|
|
|
* @property int $pid 父ID |
|
12
|
|
|
* @property string $icon 图标class |
|
13
|
|
|
* @property string $display_name 显示名称 |
|
14
|
|
|
* @property string $name 名称 |
|
15
|
|
|
* @property bool $is_menu 是否作为菜单 |
|
16
|
|
|
* @property bool $sort 排序 |
|
17
|
|
|
* @property string $description 描述 |
|
18
|
|
|
* @property \Carbon\Carbon $created_at |
|
19
|
|
|
* @property \Carbon\Carbon $updated_at |
|
20
|
|
|
* @property-read \Illuminate\Database\Eloquent\Collection|\Sco\Admin\Models\Role[] $roles |
|
21
|
|
|
* @method static \Illuminate\Database\Query\Builder|\Sco\Admin\Models\Permission whereCreatedAt($value) |
|
22
|
|
|
* @method static \Illuminate\Database\Query\Builder|\Sco\Admin\Models\Permission whereDescription($value) |
|
23
|
|
|
* @method static \Illuminate\Database\Query\Builder|\Sco\Admin\Models\Permission whereDisplayName($value) |
|
24
|
|
|
* @method static \Illuminate\Database\Query\Builder|\Sco\Admin\Models\Permission whereIcon($value) |
|
25
|
|
|
* @method static \Illuminate\Database\Query\Builder|\Sco\Admin\Models\Permission whereId($value) |
|
26
|
|
|
* @method static \Illuminate\Database\Query\Builder|\Sco\Admin\Models\Permission whereIsMenu($value) |
|
27
|
|
|
* @method static \Illuminate\Database\Query\Builder|\Sco\Admin\Models\Permission whereName($value) |
|
28
|
|
|
* @method static \Illuminate\Database\Query\Builder|\Sco\Admin\Models\Permission wherePid($value) |
|
29
|
|
|
* @method static \Illuminate\Database\Query\Builder|\Sco\Admin\Models\Permission whereSort($value) |
|
30
|
|
|
* @method static \Illuminate\Database\Query\Builder|\Sco\Admin\Models\Permission whereUpdatedAt($value) |
|
31
|
|
|
* @mixin \Eloquent |
|
32
|
|
|
*/ |
|
33
|
|
|
class Permission extends EntrustPermission |
|
34
|
|
|
{ |
|
35
|
|
|
protected $guarded = ['created_at', 'updated_at']; |
|
36
|
|
|
|
|
37
|
|
|
protected $events = [ |
|
38
|
|
|
'created' => \Sco\ActionLog\Events\ModelWasCreated::class, |
|
39
|
|
|
'updated' => \Sco\ActionLog\Events\ModelWasUpdated::class, |
|
40
|
|
|
'deleted' => \Sco\ActionLog\Events\ModelWasDeleted::class, |
|
41
|
|
|
]; |
|
42
|
|
|
} |
|
43
|
|
|
|