feat: harden tenant settings and import pipeline
This commit is contained in:
29
database/factories/PurchaseHistoryFactory.php
Normal file
29
database/factories/PurchaseHistoryFactory.php
Normal 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(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user