29 lines
600 B
PHP
29 lines
600 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\ActivationKey;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Str;
|
|
|
|
/**
|
|
* @extends Factory<ActivationKey>
|
|
*/
|
|
class ActivationKeyFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'user_id' => 1,
|
|
'activation_key' => Str::random(32),
|
|
'price_id' => fake()->numberBetween(1, 5),
|
|
'is_activated' => fake()->boolean(),
|
|
];
|
|
}
|
|
}
|