feat(event): restore event model and migrate tenant event data
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user