自动生成curd
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace app\{{module}}\service;
|
||||
namespace app\{{serviceModule}}\service;
|
||||
|
||||
use app\common\validate\RoleValidate;
|
||||
use app\{{validateModule}}\validate\{{validateName}}Validate;
|
||||
use app\common\traits\crud\CrudServiceTrait;
|
||||
use app\common\model\Role;
|
||||
use app\{{modelModule}}\model\{{modelName}};
|
||||
|
||||
class RoleService
|
||||
class {{serviceName}}Service
|
||||
{
|
||||
|
||||
use CrudServiceTrait;
|
||||
@@ -14,12 +14,12 @@ class RoleService
|
||||
/**
|
||||
* 指定当前要操作的模型
|
||||
*/
|
||||
protected string $modelClass = Role::class;
|
||||
protected string $modelClass = {{modelName}}::class;
|
||||
|
||||
/**
|
||||
* 验证器
|
||||
*/
|
||||
protected $validator = RoleValidate::class;
|
||||
protected $validator = {{validateName}}Validate::class;
|
||||
|
||||
/**
|
||||
* 获取验证器
|
||||
|
||||
Reference in New Issue
Block a user