refactor(event): move event configuration onto tenant

This commit is contained in:
2026-08-07 09:08:14 -03:00
parent 60b8415c59
commit 7b7efeb4cc
27 changed files with 433 additions and 271 deletions

View File

@@ -32,7 +32,6 @@ class CatalogSchemaTest extends TestCase
$this->assertEqualsCanonicalizing([
'id',
'tenant_code',
'event_id',
'event_product_type',
'category_id',
'brand_id',
@@ -186,21 +185,21 @@ class CatalogSchemaTest extends TestCase
]));
}
public function test_events_and_event_dates_are_linked_to_the_catalog(): void
public function test_event_configuration_and_dates_belong_to_the_tenant(): void
{
$this->assertFalse(Schema::hasTable('events'));
$this->assertTrue(Schema::hasColumns('tenants', [
'event_title',
'event_location',
]));
$this->assertEqualsCanonicalizing([
'id',
'tenant_code',
'name',
'address',
], Schema::getColumnListing('events'));
$this->assertEqualsCanonicalizing([
'id',
'event_id',
'date',
'time_start',
'time_end',
], Schema::getColumnListing('event_dates'));
$this->assertTrue(Schema::hasColumn('tenants', 'active_event_id'));
$this->assertFalse(Schema::hasColumn('catalog_items', 'event_id'));
$this->assertFalse(Schema::hasColumn('compras', 'event_id'));
}
}