feat: refactor product variant handling to use product pricing and remove unnecessary fields

This commit is contained in:
2026-06-30 15:58:19 -03:00
parent 8b10996319
commit fdeba7540b
10 changed files with 5 additions and 56 deletions

View File

@@ -18,10 +18,7 @@ class ProductVariantResource extends JsonResource
return [
'id' => $this->id,
'producto_id' => $this->producto_id,
'slug' => $this->slug,
'nombre' => $this->nombre,
'descripcion' => $this->descripcion,
'precio' => $this->precio,
'stock' => $this->stock,
'product' => ProductResource::make($this->whenLoaded('product')),
'definitions' => ProductVariantDefinitionResource::collection($this->whenLoaded('definitions')),
'images' => $this->whenLoaded('attachments', function () {