推进管理员管理和权限管理

This commit is contained in:
augushong
2019-09-04 13:25:48 +08:00
parent 0ddbf60878
commit ee2c8bf106
16 changed files with 658 additions and 23 deletions

View File

@@ -15,4 +15,11 @@ class Admin extends Model
{
return \get_source_link($value);
}
public function getGroupAttr()
{
if(empty($this->getData('group_id'))){
return '未分组';
}
}
}

16
app/model/AdminGroup.php Normal file
View File

@@ -0,0 +1,16 @@
<?php
namespace app\model;
use think\Model;
use think\model\concern\SoftDelete;
/**
* @mixin think\Model
*/
class AdminGroup extends Model
{
//
use SoftDelete;
protected $defaultSoftDelete = 0;
}

View File

@@ -0,0 +1,14 @@
<?php
namespace app\model;
use think\Model;
/**
* 权限表
* @mixin think\Model
*/
class AdminPermission extends Model
{
//
}