feat(catalog): add is_enabled field to catalog item attachments

This commit is contained in:
2026-08-14 10:24:11 -03:00
parent 58c7a0f580
commit 7fbdc00c64
5 changed files with 28 additions and 2 deletions

View File

@@ -62,6 +62,7 @@ class CatalogItemControllerTest extends TestCase
'catalog_item_id' => $item->id,
'variant_id' => $variant->id,
'orden' => 0,
'is_enabled' => true,
]);
}

View File

@@ -104,6 +104,7 @@ class CatalogSchemaTest extends TestCase
'catalog_item_id',
'attachment_id',
'orden',
'is_enabled',
], Schema::getColumnListing('catalog_items_attachments'));
}
@@ -170,12 +171,14 @@ class CatalogSchemaTest extends TestCase
'variant_id' => null,
'attachment_id' => $itemAttachment->id,
'orden' => 2,
'is_enabled' => true,
]);
$this->assertDatabaseHas('catalog_items_attachments', [
'catalog_item_id' => $item->id,
'variant_id' => $variant->id,
'attachment_id' => $variantAttachment->id,
'orden' => 3,
'is_enabled' => true,
]);
}