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

@@ -0,0 +1,29 @@
<?php
namespace Database\Factories;
use App\Models\PurchaseHistory;
use App\Models\Tenant;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
class PurchaseHistoryFactory extends Factory
{
protected $model = PurchaseHistory::class;
public function definition(): array
{
return [
'id' => (string) Str::uuid(),
'tenant_id' => Tenant::factory(),
'package_id' => $this->faker->randomElement(['starter', 'pro', 'enterprise']),
'credits_added' => $this->faker->numberBetween(1, 10),
'price' => $this->faker->randomFloat(2, 9, 199),
'currency' => 'EUR',
'platform' => $this->faker->randomElement(['tenant-app', 'ios', 'android']),
'transaction_id' => (string) Str::uuid(),
'purchased_at' => now(),
];
}
}