This commit is contained in:
2021-04-12 15:53:05 +08:00
parent bb58634d2a
commit d949c9a83c
+11 -1
View File
@@ -67,8 +67,15 @@ namespace ' . $namespace . ';
if (!empty($imports)) { if (!empty($imports)) {
$html .= $imports . PHP_EOL; $html .= $imports . PHP_EOL;
} }
if (!str_contains($imports, 'Annotation\Model\Set')) {
$html .= 'use Annotation\Model\Set' . PHP_EOL;
}
if (!str_contains($imports, 'Annotation\Model\Get')) {
$html .= 'use Annotation\Model\Get' . PHP_EOL;
}
} catch (\Throwable $e) { } catch (\Throwable $e) {
logger()->addError($e,'throwable'); logger()->addError($e, 'throwable');
} }
} }
@@ -82,6 +89,9 @@ use Exception;
use Annotation\Target; use Annotation\Target;
use Snowflake\Core\JSON; use Snowflake\Core\JSON;
use Database\Connection; use Database\Connection;
use Annotation\Model\Get;
use Annotation\Model\Set;
use Annotation\Model\Relation;
use Database\ActiveRecord; use Database\ActiveRecord;
' . PHP_EOL; ' . PHP_EOL;
} }