feat: implement product creation workflow with variants, attribute definitions, and validation logic

This commit is contained in:
2026-06-29 11:02:04 -03:00
parent 9d3ed17c00
commit 18504594eb
23 changed files with 774 additions and 146 deletions

View File

@@ -3,7 +3,7 @@
namespace Tests\Feature\Cart;
use App\Domains\Catalog\Models\Product;
use App\Domains\Catalog\Models\ProductAttribute;
use App\Domains\Catalog\Models\Attribute;
use App\Domains\Catalog\Models\ProductVariant;
use App\Domains\Catalog\Models\ProductVariantDefinition;
use App\Domains\Tenant\Models\Tenant;
@@ -33,7 +33,7 @@ class CartControllerTest extends TestCase
public function test_it_creates_a_guest_cart_and_returns_the_cart_snapshot(): void
{
$variant = $this->createVariantForTenant('acme', 10, '49.90');
$attribute = ProductAttribute::query()->create([
$attribute = Attribute::query()->create([
'tenant_codigo' => 'acme',
'codigo' => 'color',
'nombre' => 'Color',