Explorar el Código

feat(GameItems): 为 treasure_chest 表添加 item_id 字段

- 在 GenerateChestJsonCommand 中添加 item_id 字段的查询
- 更新 items.json 文件,包含新的 item_id 字段

此更新将允许我们在 treasure_chest 表中添加新的外键,并在 items.json 文件中使用此字段。未来我们将实现相关的前端功能。
Your Name hace 8 meses
padre
commit
b604775404

+ 1 - 1
app/Module/GameItems/Commands/GenerateChestJsonCommand.php

@@ -78,7 +78,7 @@ class GenerateChestJsonCommand extends Command
                         ]);
                     }
                 ])
-                ->select(['id', 'name', 'numeric_attributes'])
+                ->select(['id', 'name', 'item_id','numeric_attributes'])
                 ->get();
 
             // 处理数据,去除不必要的字段

+ 1 - 1
public/json/items.json

@@ -1,5 +1,5 @@
 {
-    "generated_at": "2025-05-12 08:06:07",
+    "generated_at": "2025-05-12 08:08:50",
     "items": [
         {
             "id": 1,