31 lines
511 B
Plaintext
31 lines
511 B
Plaintext
<?php
|
|
|
|
namespace app\{{module}}\service;
|
|
|
|
use app\common\validate\RoleValidate;
|
|
use app\common\traits\crud\CrudServiceTrait;
|
|
use app\common\model\Role;
|
|
|
|
class RoleService
|
|
{
|
|
|
|
use CrudServiceTrait;
|
|
|
|
/**
|
|
* 指定当前要操作的模型
|
|
*/
|
|
protected string $modelClass = Role::class;
|
|
|
|
/**
|
|
* 验证器
|
|
*/
|
|
protected $validator = RoleValidate::class;
|
|
|
|
/**
|
|
* 获取验证器
|
|
*/
|
|
public function getValidator()
|
|
{
|
|
return new $this->validator;
|
|
}
|
|
} |