fix: openapi取消产品详情sku->sort字段输出

This commit is contained in:
2025-07-05 13:47:57 +08:00
parent d83c2b1ab3
commit 5424e8b2cb

View File

@@ -75,7 +75,7 @@ class Product
'params' => fn($query) => $query->field(['product_id', 'name', 'value']) 'params' => fn($query) => $query->field(['product_id', 'name', 'value'])
->hidden(['product_id']), ->hidden(['product_id']),
// 关联sku // 关联sku
'skus' => fn($query) => $query->withoutField(['created_at', 'updated_at']) 'skus' => fn($query) => $query->withoutField(['sort', 'created_at', 'updated_at'])
->with([ ->with([
'sku_attr' => fn($query) => $query->with('attr')->hidden(['sku_id', 'attr_id']) 'sku_attr' => fn($query) => $query->with('attr')->hidden(['sku_id', 'attr_id'])
]) ])