From 69320c54d4632e96bcc1e36974597a1627ccf635 Mon Sep 17 00:00:00 2001 From: ncoronel Date: Mon, 10 Aug 2026 16:37:28 -0300 Subject: [PATCH] feat: remove EventProductType references and related logic from catalog and fiesta futbol infantil components --- .../Catalog/Enums/EventProductType.php | 15 ------- app/Domains/Catalog/Models/CatalogItem.php | 3 -- .../Requests/StoreCatalogItemRequest.php | 6 --- .../Resources/CatalogItemDetailResource.php | 1 - .../Catalog/Resources/CatalogItemResource.php | 1 - .../Catalog/Services/CatalogService.php | 18 -------- .../Requests/UpsertEntriesRequest.php | 6 ++- .../Requests/UpsertMerchandiseRequest.php | 6 ++- .../Services/AccommodationService.php | 3 -- .../Services/EntryService.php | 7 +--- .../Services/FoodService.php | 3 -- .../Services/MerchandiseService.php | 6 --- ..._000000_create_events_and_link_catalog.php | 5 --- ...ets_for_fiesta_futbol_infantil_catalog.php | 7 +++- ..._event_product_type_from_catalog_items.php | 32 +++++++++++++++ .../FiestaFutbolInfantilProductSeeder.php | 3 -- lang/en/api.php | 1 - lang/es/api.php | 1 - tests/Feature/Catalog/CatalogSchemaTest.php | 1 - .../EntryControllerTest.php | 41 ++++++++++++++++++- tests/Unit/Catalog/CatalogModelsTest.php | 3 -- 21 files changed, 90 insertions(+), 79 deletions(-) delete mode 100644 app/Domains/Catalog/Enums/EventProductType.php create mode 100644 database/migrations/2026_08_10_000300_remove_event_product_type_from_catalog_items.php diff --git a/app/Domains/Catalog/Enums/EventProductType.php b/app/Domains/Catalog/Enums/EventProductType.php deleted file mode 100644 index 56157ad..0000000 --- a/app/Domains/Catalog/Enums/EventProductType.php +++ /dev/null @@ -1,15 +0,0 @@ - */ - public static function values(): array - { - return array_column(self::cases(), 'value'); - } -} diff --git a/app/Domains/Catalog/Models/CatalogItem.php b/app/Domains/Catalog/Models/CatalogItem.php index fb96548..c5dac47 100644 --- a/app/Domains/Catalog/Models/CatalogItem.php +++ b/app/Domains/Catalog/Models/CatalogItem.php @@ -4,7 +4,6 @@ namespace App\Domains\Catalog\Models; use App\Domains\Attachable\Models\Attachment; use App\Domains\Catalog\Enums\CatalogItemType; -use App\Domains\Catalog\Enums\EventProductType; use App\Domains\Catalog\Enums\InventoryPolicy; use App\Domains\Catalog\Services\CatalogInventoryService; use App\Domains\Tenant\Models\Tenant; @@ -20,7 +19,6 @@ use Illuminate\Support\Collection; #[Fillable([ 'tenant_code', - 'event_product_type', 'category_id', 'brand_id', 'inventory_id', @@ -54,7 +52,6 @@ class CatalogItem extends Model 'category_id' => 'integer', 'brand_id' => 'integer', 'inventory_id' => 'integer', - 'event_product_type' => EventProductType::class, 'type' => CatalogItemType::class, 'precio' => 'decimal:2', 'inventory_policy' => InventoryPolicy::class, diff --git a/app/Domains/Catalog/Requests/StoreCatalogItemRequest.php b/app/Domains/Catalog/Requests/StoreCatalogItemRequest.php index 105b072..4a60875 100644 --- a/app/Domains/Catalog/Requests/StoreCatalogItemRequest.php +++ b/app/Domains/Catalog/Requests/StoreCatalogItemRequest.php @@ -3,7 +3,6 @@ namespace App\Domains\Catalog\Requests; use App\Domains\Catalog\Enums\CatalogItemType; -use App\Domains\Catalog\Enums\EventProductType; use App\Domains\Catalog\Enums\InventoryPolicy; use App\Domains\Shared\Rules\ImageOrBase64Rule; use Illuminate\Foundation\Http\FormRequest; @@ -26,11 +25,6 @@ class StoreCatalogItemRequest extends FormRequest return [ 'tenant_code' => ['prohibited'], 'type' => ['sometimes', Rule::enum(CatalogItemType::class)], - 'event_product_type' => [ - 'sometimes', - 'nullable', - Rule::enum(EventProductType::class), - ], 'category_id' => [ 'sometimes', 'nullable', diff --git a/app/Domains/Catalog/Resources/CatalogItemDetailResource.php b/app/Domains/Catalog/Resources/CatalogItemDetailResource.php index 9de5808..aba2f3c 100644 --- a/app/Domains/Catalog/Resources/CatalogItemDetailResource.php +++ b/app/Domains/Catalog/Resources/CatalogItemDetailResource.php @@ -24,7 +24,6 @@ class CatalogItemDetailResource extends JsonResource return [ 'id' => $this->id, 'type' => $this->type->value, - 'event_product_type' => $this->event_product_type?->value, 'category_id' => $this->category_id, 'brand_id' => $this->brand_id, 'slug' => $this->slug, diff --git a/app/Domains/Catalog/Resources/CatalogItemResource.php b/app/Domains/Catalog/Resources/CatalogItemResource.php index d9cee10..38af5a4 100644 --- a/app/Domains/Catalog/Resources/CatalogItemResource.php +++ b/app/Domains/Catalog/Resources/CatalogItemResource.php @@ -16,7 +16,6 @@ class CatalogItemResource extends JsonResource return [ 'id' => $this->id, 'type' => $this->type->value, - 'event_product_type' => $this->event_product_type?->value, 'category_id' => $this->category_id, 'brand_id' => $this->brand_id, 'slug' => $this->slug, diff --git a/app/Domains/Catalog/Services/CatalogService.php b/app/Domains/Catalog/Services/CatalogService.php index 9a0a3b2..9af1686 100644 --- a/app/Domains/Catalog/Services/CatalogService.php +++ b/app/Domains/Catalog/Services/CatalogService.php @@ -5,7 +5,6 @@ namespace App\Domains\Catalog\Services; use App\Domains\Attachable\Models\Attachment; use App\Domains\Attachable\Services\AttachmentService; use App\Domains\Catalog\Enums\CatalogItemType; -use App\Domains\Catalog\Enums\EventProductType; use App\Domains\Catalog\Models\Attribute; use App\Domains\Catalog\Models\CatalogItem; use App\Domains\Catalog\Models\Category; @@ -65,7 +64,6 @@ class CatalogService ]); } - $this->validateEventProductType($data); $this->validateUniqueVariantCombinations($variants, $attributeCodes); if ($type === CatalogItemType::Bundle) { @@ -622,22 +620,6 @@ class CatalogService return $variant; } - /** @param array $data */ - private function validateEventProductType(array $data): void - { - $eventProductType = $data['event_product_type'] ?? null; - - if ($eventProductType === null) { - return; - } - - if (! in_array($eventProductType, EventProductType::values(), true)) { - throw ValidationException::withMessages([ - 'event_product_type' => [__('api.catalog.invalid_event_product_type')], - ]); - } - } - /** * @param array> $variants * @param array $attributeCodes diff --git a/app/Domains/FiestaFutbolInfantil/Requests/UpsertEntriesRequest.php b/app/Domains/FiestaFutbolInfantil/Requests/UpsertEntriesRequest.php index 0bcccd0..6a993e9 100644 --- a/app/Domains/FiestaFutbolInfantil/Requests/UpsertEntriesRequest.php +++ b/app/Domains/FiestaFutbolInfantil/Requests/UpsertEntriesRequest.php @@ -29,7 +29,11 @@ class UpsertEntriesRequest extends FormRequest Rule::exists('catalog_items', 'id')->where( fn ($query) => $query ->where('tenant_code', $tenantCode) - ->where('event_product_type', 'entrada') + ->whereIn('category_id', fn ($categoryQuery) => $categoryQuery + ->select('id') + ->from('categorias') + ->where('tenant_code', $tenantCode) + ->where('nombre', 'Entradas')) ), ], 'entries.*.title' => ['required', 'string', 'max:255'], diff --git a/app/Domains/FiestaFutbolInfantil/Requests/UpsertMerchandiseRequest.php b/app/Domains/FiestaFutbolInfantil/Requests/UpsertMerchandiseRequest.php index 77bfeab..2283b55 100644 --- a/app/Domains/FiestaFutbolInfantil/Requests/UpsertMerchandiseRequest.php +++ b/app/Domains/FiestaFutbolInfantil/Requests/UpsertMerchandiseRequest.php @@ -28,7 +28,11 @@ class UpsertMerchandiseRequest extends FormRequest Rule::exists('catalog_items', 'id')->where( fn ($query) => $query ->where('tenant_code', $tenantCode) - ->where('event_product_type', 'producto') + ->whereIn('category_id', fn ($categoryQuery) => $categoryQuery + ->select('id') + ->from('categorias') + ->where('tenant_code', $tenantCode) + ->where('nombre', 'Merchandising')) ), ], 'items.*.title' => ['required', 'string', 'max:255'], diff --git a/app/Domains/FiestaFutbolInfantil/Services/AccommodationService.php b/app/Domains/FiestaFutbolInfantil/Services/AccommodationService.php index d1dd853..85f0d4a 100644 --- a/app/Domains/FiestaFutbolInfantil/Services/AccommodationService.php +++ b/app/Domains/FiestaFutbolInfantil/Services/AccommodationService.php @@ -2,7 +2,6 @@ namespace App\Domains\FiestaFutbolInfantil\Services; -use App\Domains\Catalog\Enums\EventProductType; use App\Domains\Catalog\Enums\InventoryPolicy; use App\Domains\Catalog\Models\Attribute; use App\Domains\Catalog\Models\AttributeOption; @@ -135,7 +134,6 @@ class AccommodationService if ($accommodation !== null) { $accommodation->update([ 'category_id' => $category->id, - 'event_product_type' => EventProductType::Product->value, 'inventory_policy' => InventoryPolicy::Tracked->value, 'has_tickets' => true, ]); @@ -150,7 +148,6 @@ class AccommodationService 'descripcion' => 'Alojamiento', 'category_id' => $category->id, 'precio' => collect($variants)->min('price') ?? 0, - 'event_product_type' => EventProductType::Product->value, 'inventory_policy' => InventoryPolicy::Tracked->value, 'has_tickets' => true, 'inventory_id' => null, diff --git a/app/Domains/FiestaFutbolInfantil/Services/EntryService.php b/app/Domains/FiestaFutbolInfantil/Services/EntryService.php index a0b4ae2..b500372 100644 --- a/app/Domains/FiestaFutbolInfantil/Services/EntryService.php +++ b/app/Domains/FiestaFutbolInfantil/Services/EntryService.php @@ -2,7 +2,6 @@ namespace App\Domains\FiestaFutbolInfantil\Services; -use App\Domains\Catalog\Enums\EventProductType; use App\Domains\Catalog\Enums\InventoryPolicy; use App\Domains\Catalog\Models\CatalogItem; use App\Domains\Catalog\Models\Category; @@ -24,7 +23,7 @@ class EntryService { return CatalogItem::query() ->where('tenant_code', $tenant->codigo) - ->where('event_product_type', EventProductType::Entry->value) + ->whereHas('category', fn ($query) => $query->where('nombre', 'Entradas')) ->with([ 'variants.inventory', 'variants.eventDate', @@ -62,7 +61,6 @@ class EntryService 'descripcion' => $entry['description'] ?? null, 'category_id' => $category->id, 'precio' => $entry['price'], - 'event_product_type' => EventProductType::Entry->value, 'has_tickets' => true, 'inventory_policy' => InventoryPolicy::Tracked->value, 'attribute_codes' => ['event_date'], @@ -81,7 +79,6 @@ class EntryService $entry = CatalogItem::query() ->whereKey($entryId) ->where('tenant_code', $tenant->codigo) - ->where('event_product_type', EventProductType::Entry->value) ->whereHas('category', fn ($query) => $query->where('nombre', 'Entradas')) ->firstOrFail(); @@ -94,7 +91,7 @@ class EntryService $catalogItem = CatalogItem::query() ->whereKey($entry['id']) ->where('tenant_code', $tenant->codigo) - ->where('event_product_type', EventProductType::Entry->value) + ->whereHas('category', fn ($query) => $query->where('nombre', 'Entradas')) ->lockForUpdate() ->firstOrFail(); diff --git a/app/Domains/FiestaFutbolInfantil/Services/FoodService.php b/app/Domains/FiestaFutbolInfantil/Services/FoodService.php index 905bb7c..aa32933 100644 --- a/app/Domains/FiestaFutbolInfantil/Services/FoodService.php +++ b/app/Domains/FiestaFutbolInfantil/Services/FoodService.php @@ -2,7 +2,6 @@ namespace App\Domains\FiestaFutbolInfantil\Services; -use App\Domains\Catalog\Enums\EventProductType; use App\Domains\Catalog\Enums\InventoryPolicy; use App\Domains\Catalog\Models\Attribute; use App\Domains\Catalog\Models\AttributeOption; @@ -146,7 +145,6 @@ class FoodService if ($food !== null) { $food->update([ 'category_id' => $category->id, - 'event_product_type' => EventProductType::Product->value, 'inventory_policy' => InventoryPolicy::Tracked->value, 'has_tickets' => true, ]); @@ -161,7 +159,6 @@ class FoodService 'descripcion' => 'Comida', 'category_id' => $category->id, 'precio' => collect($variants)->min('price') ?? 0, - 'event_product_type' => EventProductType::Product->value, 'inventory_policy' => InventoryPolicy::Tracked->value, 'has_tickets' => true, 'inventory_id' => null, diff --git a/app/Domains/FiestaFutbolInfantil/Services/MerchandiseService.php b/app/Domains/FiestaFutbolInfantil/Services/MerchandiseService.php index 7bab7fd..4307e51 100644 --- a/app/Domains/FiestaFutbolInfantil/Services/MerchandiseService.php +++ b/app/Domains/FiestaFutbolInfantil/Services/MerchandiseService.php @@ -2,7 +2,6 @@ namespace App\Domains\FiestaFutbolInfantil\Services; -use App\Domains\Catalog\Enums\EventProductType; use App\Domains\Catalog\Enums\InventoryPolicy; use App\Domains\Catalog\Models\Attribute; use App\Domains\Catalog\Models\AttributeOption; @@ -29,7 +28,6 @@ class MerchandiseService { return CatalogItem::query() ->where('tenant_code', $tenant->codigo) - ->where('event_product_type', EventProductType::Product->value) ->whereHas('category', fn ($query) => $query->where('nombre', 'Merchandising')) ->with([ 'itemAttributes.attribute.options', @@ -74,7 +72,6 @@ class MerchandiseService 'descripcion' => $data['description'] ?? null, 'category_id' => $category->id, 'max_units_per_user' => (int) $data['max_units_per_user'], - 'event_product_type' => EventProductType::Product->value, 'inventory_policy' => InventoryPolicy::Tracked->value, 'has_tickets' => true, ]); @@ -129,7 +126,6 @@ class MerchandiseService ->whereKey($merchandiseId) ->whereHas('catalogItem', fn ($query) => $query ->where('tenant_code', $tenant->codigo) - ->where('event_product_type', EventProductType::Product->value) ->whereHas('category', fn ($categoryQuery) => $categoryQuery ->where('nombre', 'Merchandising'))) ->firstOrFail(); @@ -170,7 +166,6 @@ class MerchandiseService ->whereKey($itemId) ->where('tenant_code', $tenant->codigo) ->where('category_id', $category->id) - ->where('event_product_type', EventProductType::Product->value) ->lockForUpdate() ->first(); @@ -201,7 +196,6 @@ class MerchandiseService 'category_id' => $category->id, 'precio' => collect($data['variants'])->min('price') ?? 0, 'max_units_per_user' => (int) $data['max_units_per_user'], - 'event_product_type' => EventProductType::Product->value, 'inventory_policy' => InventoryPolicy::Tracked->value, 'has_tickets' => true, 'inventory_id' => null, diff --git a/database/migrations/2026_08_03_000000_create_events_and_link_catalog.php b/database/migrations/2026_08_03_000000_create_events_and_link_catalog.php index e8f84c3..e9cdd8c 100644 --- a/database/migrations/2026_08_03_000000_create_events_and_link_catalog.php +++ b/database/migrations/2026_08_03_000000_create_events_and_link_catalog.php @@ -1,6 +1,5 @@ after('tenant_code') ->constrained('events') ->nullOnDelete(); - $table->enum('event_product_type', EventProductType::values()) - ->nullable() - ->after('event_id'); }); Schema::table('variantes', function (Blueprint $table): void { @@ -71,7 +67,6 @@ return new class extends Migration Schema::table('catalog_items', function (Blueprint $table): void { $table->dropConstrainedForeignId('event_id'); - $table->dropColumn('event_product_type'); }); Schema::dropIfExists('event_dates'); diff --git a/database/migrations/2026_08_10_000200_enable_tickets_for_fiesta_futbol_infantil_catalog.php b/database/migrations/2026_08_10_000200_enable_tickets_for_fiesta_futbol_infantil_catalog.php index 128c15c..f91fba4 100644 --- a/database/migrations/2026_08_10_000200_enable_tickets_for_fiesta_futbol_infantil_catalog.php +++ b/database/migrations/2026_08_10_000200_enable_tickets_for_fiesta_futbol_infantil_catalog.php @@ -14,9 +14,14 @@ return new class extends Migration public function down(): void { + $entryCategoryIds = DB::table('categorias') + ->select('id') + ->where('tenant_code', 'fiesta_futbol_infantil') + ->where('nombre', 'Entradas'); + DB::table('catalog_items') ->where('tenant_code', 'fiesta_futbol_infantil') - ->where('event_product_type', 'producto') + ->whereNotIn('category_id', $entryCategoryIds) ->update(['has_tickets' => false]); } }; diff --git a/database/migrations/2026_08_10_000300_remove_event_product_type_from_catalog_items.php b/database/migrations/2026_08_10_000300_remove_event_product_type_from_catalog_items.php new file mode 100644 index 0000000..6df1f59 --- /dev/null +++ b/database/migrations/2026_08_10_000300_remove_event_product_type_from_catalog_items.php @@ -0,0 +1,32 @@ +dropColumn('event_product_type'); + }); + } + + public function down(): void + { + if (Schema::hasColumn('catalog_items', 'event_product_type')) { + return; + } + + Schema::table('catalog_items', function (Blueprint $table): void { + $table->enum('event_product_type', ['entrada', 'producto']) + ->nullable() + ->after('tenant_code'); + }); + } +}; diff --git a/database/seeders/FiestaFutbolInfantilProductSeeder.php b/database/seeders/FiestaFutbolInfantilProductSeeder.php index 5ede0a5..20869b7 100644 --- a/database/seeders/FiestaFutbolInfantilProductSeeder.php +++ b/database/seeders/FiestaFutbolInfantilProductSeeder.php @@ -2,7 +2,6 @@ namespace Database\Seeders; -use App\Domains\Catalog\Enums\EventProductType; use App\Domains\Catalog\Enums\FeaturedGroupSource; use App\Domains\Catalog\Enums\GroupLayout; use App\Domains\Catalog\Enums\InventoryPolicy; @@ -109,7 +108,6 @@ class FiestaFutbolInfantilProductSeeder extends Seeder 'nombre' => 'Abono', 'category_id' => $categories['entradas']->id, 'precio' => 40000, - 'event_product_type' => EventProductType::Entry->value, 'has_tickets' => true, 'attribute_codes' => ['event_date'], 'multi_select_attribute_codes' => ['event_date'], @@ -143,7 +141,6 @@ class FiestaFutbolInfantilProductSeeder extends Seeder { return $this->catalogService->create([ 'tenant_code' => $tenant->codigo, - 'event_product_type' => EventProductType::Product->value, 'descripcion' => $data['nombre'], 'inventory_policy' => InventoryPolicy::Unlimited->value, ...$data, diff --git a/lang/en/api.php b/lang/en/api.php index 980aae2..91cc55b 100644 --- a/lang/en/api.php +++ b/lang/en/api.php @@ -98,7 +98,6 @@ return [ 'event_date_selection_required' => 'At least one event date must be selected.', 'single_event_date_required' => 'Exactly one event date must be selected.', 'event_date_wrong_tenant' => 'Every event date must belong to the catalog item tenant.', - 'invalid_event_product_type' => 'The event product type is invalid.', 'duplicate_variant_combination' => 'The variant combination must be unique.', 'multi_value_required' => 'At least one value must be selected.', 'single_value_required' => 'Exactly one value must be selected.', diff --git a/lang/es/api.php b/lang/es/api.php index d758a0c..129e49d 100644 --- a/lang/es/api.php +++ b/lang/es/api.php @@ -98,7 +98,6 @@ return [ 'event_date_selection_required' => 'Debe seleccionar al menos una fecha de evento.', 'single_event_date_required' => 'Debe seleccionar exactamente una fecha de evento.', 'event_date_wrong_tenant' => 'Todas las fechas del evento deben pertenecer al tenant del ítem de catálogo.', - 'invalid_event_product_type' => 'El tipo de producto de evento no es válido.', 'duplicate_variant_combination' => 'La combinación de la variante debe ser única.', 'multi_value_required' => 'Debe seleccionar al menos un valor.', 'single_value_required' => 'Debe seleccionar exactamente un valor.', diff --git a/tests/Feature/Catalog/CatalogSchemaTest.php b/tests/Feature/Catalog/CatalogSchemaTest.php index f25246c..93c867f 100644 --- a/tests/Feature/Catalog/CatalogSchemaTest.php +++ b/tests/Feature/Catalog/CatalogSchemaTest.php @@ -33,7 +33,6 @@ class CatalogSchemaTest extends TestCase $this->assertEqualsCanonicalizing([ 'id', 'tenant_code', - 'event_product_type', 'category_id', 'brand_id', 'inventory_id', diff --git a/tests/Feature/FiestaFutbolInfantil/EntryControllerTest.php b/tests/Feature/FiestaFutbolInfantil/EntryControllerTest.php index 3a0322f..9a02329 100644 --- a/tests/Feature/FiestaFutbolInfantil/EntryControllerTest.php +++ b/tests/Feature/FiestaFutbolInfantil/EntryControllerTest.php @@ -100,7 +100,6 @@ class EntryControllerTest extends TestCase CatalogItem::query()->each(function (CatalogItem $entry) use ($tenant, $entryCategory): void { $this->assertSame($tenant->codigo, $entry->tenant_code); $this->assertSame($entryCategory->id, $entry->category_id); - $this->assertSame('entrada', $entry->event_product_type->value); $this->assertSame('tracked', $entry->inventory_policy->value); $this->assertTrue($entry->has_tickets); $this->assertNull($entry->inventory_id); @@ -224,6 +223,46 @@ class EntryControllerTest extends TestCase $this->assertDatabaseCount('catalog_items', 0); } + public function test_entries_are_identified_by_the_entries_category(): void + { + $tenant = $this->createFiestaTenant(); + $this->createEventDateAttribute($tenant); + $eventDate = $tenant->eventDates()->create([ + 'date' => '2026-10-09', + 'time_start' => '00:00', + 'time_end' => '23:59', + ]); + $merchandisingCategory = Category::query()->create([ + 'tenant_code' => $tenant->codigo, + 'nombre' => 'Merchandising', + ]); + $merchandise = CatalogItem::query()->create([ + 'tenant_code' => $tenant->codigo, + 'category_id' => $merchandisingCategory->id, + 'slug' => 'camiseta', + 'nombre' => 'Camiseta', + 'precio' => 100, + ]); + Sanctum::actingAs($this->createAdminAppUser($tenant)); + + $this->getJson('/api/v1/adminapp/tenant/entries') + ->assertOk() + ->assertJsonCount(0, 'data'); + + $this->postJson('/api/v1/adminapp/tenant/entries', [ + 'entries' => [[ + 'id' => $merchandise->id, + 'title' => 'Entrada inválida', + 'description' => null, + 'event_date_ids' => [$eventDate->id], + 'stock' => 10, + 'price' => 100, + ]], + ]) + ->assertUnprocessable() + ->assertJsonValidationErrors(['entries.0.id']); + } + public function test_the_endpoint_is_only_available_for_fiesta_futbol_infantil(): void { $tenant = $this->createTenant('other'); diff --git a/tests/Unit/Catalog/CatalogModelsTest.php b/tests/Unit/Catalog/CatalogModelsTest.php index e364d2b..48e5a17 100644 --- a/tests/Unit/Catalog/CatalogModelsTest.php +++ b/tests/Unit/Catalog/CatalogModelsTest.php @@ -4,7 +4,6 @@ namespace Tests\Unit\Catalog; use App\Domains\Attachable\Models\Attachment; use App\Domains\Catalog\Enums\CatalogItemType; -use App\Domains\Catalog\Enums\EventProductType; use App\Domains\Catalog\Enums\FeaturedGroupSource; use App\Domains\Catalog\Enums\GroupLayout; use App\Domains\Catalog\Enums\InventoryPolicy; @@ -76,7 +75,6 @@ class CatalogModelsTest extends TestCase 'category_id' => '10', 'brand_id' => '20', 'inventory_id' => '30', - 'event_product_type' => EventProductType::Entry->value, 'type' => CatalogItemType::Standard->value, 'precio' => '12.50', 'inventory_policy' => InventoryPolicy::Tracked->value, @@ -88,7 +86,6 @@ class CatalogModelsTest extends TestCase $this->assertSame(10, $item->category_id); $this->assertSame(20, $item->brand_id); $this->assertSame(30, $item->inventory_id); - $this->assertSame(EventProductType::Entry, $item->event_product_type); $this->assertSame(CatalogItemType::Standard, $item->type); $this->assertSame('12.50', $item->precio); $this->assertSame(InventoryPolicy::Tracked, $item->inventory_policy);