自动生成curd

This commit is contained in:
mzl
2025-07-21 19:11:29 +08:00
parent 6580e21880
commit c42236da7e
10 changed files with 248 additions and 70 deletions
@@ -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;
/**
* 获取验证器