删除冗余代码&修复bug

This commit is contained in:
JaguarJack
2020-07-14 17:35:16 +08:00
parent fc93826016
commit 8a901e89cb
6 changed files with 39 additions and 55 deletions

View File

@@ -3,6 +3,8 @@ namespace catcher\generate\factory;
use catcher\exceptions\FailedException;
use catcher\generate\template\Model as Template;
use catcher\Utils;
use Phinx\Util\Util;
use think\facade\Db;
use think\helper\Str;
@@ -52,7 +54,7 @@ class Model extends Factory
}
$content = $template->useTrait($extra['soft_delete']) .
$template->name($table) .
$template->name(str_replace(Utils::tablePrefix(), '', $table)) .
$template->field($this->parseField($table));
$class = $template->header() .

View File

@@ -58,7 +58,7 @@ TMP;
{
if ($name) {
return <<<TMP
protected \$name = '{$name}';
protected \$name = '{$name}';
TMP;