diff --git a/Gii/GiiModel.php b/Gii/GiiModel.php index 3df3449a..79d21b01 100644 --- a/Gii/GiiModel.php +++ b/Gii/GiiModel.php @@ -67,8 +67,15 @@ namespace ' . $namespace . '; if (!empty($imports)) { $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) { - logger()->addError($e,'throwable'); + logger()->addError($e, 'throwable'); } } @@ -82,6 +89,9 @@ use Exception; use Annotation\Target; use Snowflake\Core\JSON; use Database\Connection; +use Annotation\Model\Get; +use Annotation\Model\Set; +use Annotation\Model\Relation; use Database\ActiveRecord; ' . PHP_EOL; }