Browse Source

改进模型注解生成器:注释DDL语句;新增jsonconfig命令

Your Name 8 months ago
parent
commit
affcb61d6c
2 changed files with 6 additions and 2 deletions
  1. 2 2
      UCore/Commands/GenerateModelAnnotation.php
  2. 4 0
      composer.json

+ 2 - 2
UCore/Commands/GenerateModelAnnotation.php

@@ -535,8 +535,8 @@ class GenerateModelAnnotation extends Command
         $sqlContent .= "-- 警告: 此文件由系统自动生成,禁止手动修改!\n";
         $sqlContent .= "-- ******************************************************************\n\n";
 
-        $sqlContent .= "DROP TABLE IF EXISTS `{$tableName}`;\n";
-        $sqlContent .= "{$createSQL};\n";
+//        $sqlContent .= "DROP TABLE IF EXISTS `{$tableName}`;\n";
+//        $sqlContent .= "{$createSQL};\n";
 
         File::put($sqlFile, $sqlContent);
         $this->debug("已生成SQL: {$sqlFile} (无前缀表名: {$tableNameWithoutPrefix})");

+ 4 - 0
composer.json

@@ -90,6 +90,10 @@
             "protoc --php_out=protophp proto/game.proto",
             "php artisan proto:route --force",
             "@composer dump-autoload"
+        ],
+        "jsonconfig": [
+            "php artisan gameitems:generate-json",
+            "php artisan gameitems:generate-chest-json"
         ]
     },
     "extra": {