28 lines
720 B
PHP
28 lines
720 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Package;
|
|
use App\Models\PackagePurchase;
|
|
use App\Models\Tenant;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class PackagePurchaseFactory extends Factory
|
|
{
|
|
protected $model = PackagePurchase::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'tenant_id' => Tenant::factory(),
|
|
'package_id' => Package::factory(),
|
|
'provider' => 'manual',
|
|
'provider_id' => $this->faker->uuid(),
|
|
'price' => $this->faker->randomFloat(2, 0, 500),
|
|
'purchased_at' => now(),
|
|
'type' => 'endcustomer_event',
|
|
'metadata' => ['source' => 'factory'],
|
|
];
|
|
}
|
|
}
|