feat(event): restore event model and migrate tenant event data

This commit is contained in:
2026-09-18 11:31:51 -03:00
parent 1e67d27a90
commit 0170a2eabb
13 changed files with 339 additions and 81 deletions

View File

@@ -56,15 +56,12 @@ class DesfilePuraTendenciaSeeder extends Seeder
private function createTenant(Client $client): void
{
$this->tenantService->create([
$tenant = $this->tenantService->create([
'client_id' => $client->id,
'codigo' => self::TENANT_CODE,
'nombre' => 'Desfile Pura Tendencia',
'dominio' => 'desfile-pura-tendencia.localhost',
'site_title' => 'Desfile Pura Tendencia',
'event_title' => 'Desfile Pura Tendencia',
'event_location' => 'Salón Centro Recreativo Luz y Fuerza',
'event_date_text' => '16 de Octubre 2026',
'primary_color' => '#BA69A9',
'secondary_color' => '#A0A0A0',
'danger_color' => '#FF8888',
@@ -107,6 +104,14 @@ class DesfilePuraTendenciaSeeder extends Seeder
],
],
]);
$event = $tenant->events()->create([
'title' => 'Desfile Pura Tendencia',
'location' => 'Salón Centro Recreativo Luz y Fuerza',
'date_text' => '16 de Octubre 2026',
'published_at' => now(),
]);
$tenant->update(['active_event_id' => $event->id]);
}
private function createEventDate(): void
@@ -124,6 +129,7 @@ class DesfilePuraTendenciaSeeder extends Seeder
DB::table('event_dates')->insert([
'tenant_code' => self::TENANT_CODE,
'event_id' => DB::table('events')->where('tenant_code', self::TENANT_CODE)->value('id'),
'validity_time_id' => $validityTimeId,
'date' => '2026-10-16',
'time_start' => '20:30:00',