feat: harden tenant settings and import pipeline

This commit is contained in:
2025-09-25 11:50:18 +02:00
parent b22d91ed32
commit 9248d7a3f5
29 changed files with 577 additions and 293 deletions

View File

@@ -14,17 +14,19 @@ class TenantFactory extends Factory
{
$name = $this->faker->company();
$slug = Str::slug($name);
$contactEmail = $this->faker->companyEmail();
return [
'name' => $name,
'slug' => $slug,
'contact_email' => $this->faker->companyEmail(),
'contact_email' => $contactEmail,
'event_credits_balance' => $this->faker->numberBetween(1, 20),
'subscription_tier' => $this->faker->randomElement(['free', 'starter', 'pro']),
'subscription_expires_at' => $this->faker->dateTimeBetween('now', '+1 year'),
'is_active' => true,
'is_suspended' => false,
'settings' => json_encode([
'settings_updated_at' => now(),
'settings' => [
'branding' => [
'logo_url' => null,
'primary_color' => '#3B82F6',
@@ -38,8 +40,9 @@ class TenantFactory extends Factory
'advanced_analytics' => false,
],
'custom_domain' => null,
]),
'settings_updated_at' => now(),
'contact_email' => $contactEmail,
'event_default_type' => 'general',
],
];
}
@@ -63,4 +66,5 @@ class TenantFactory extends Factory
'event_credits_balance' => 1,
]);
}
}
}