Files
fdesk/app/admin/service/RoleService.php
T

41 lines
719 B
PHP
Raw Normal View History

2025-07-21 15:09:06 +08:00
<?php
namespace app\admin\service;
2025-08-12 15:26:17 +08:00
use app\common\logic\RoleLogic;
2025-07-21 15:09:06 +08:00
use app\common\validate\RoleValidate;
use app\common\traits\crud\CrudServiceTrait;
use app\common\model\Role;
2025-08-12 15:26:17 +08:00
use support\Db;
2025-07-21 15:09:06 +08:00
class RoleService
{
use CrudServiceTrait;
/**
* 指定当前要操作的模型
*/
protected string $modelClass = Role::class;
/**
* 验证器
*/
protected $validator = RoleValidate::class;
/**
* 获取验证器
*/
public function getValidator()
{
return new $this->validator;
}
2025-08-12 15:26:17 +08:00
/**
* 获取角色资源
*/
public function menuResource($request, $data)
{
return (new RoleLogic)->updateRoleResources($data);
}
2025-07-21 15:09:06 +08:00
}