38 lines
878 B
PHP
38 lines
878 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\InvoicePackage;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* Factory for generating InvoicePackage model instances with randomized data.
|
|
*
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\InvoicePackage>
|
|
*/
|
|
class InvoicePackageFactory extends Factory
|
|
{
|
|
/**
|
|
* Associated model.
|
|
*
|
|
* @var class-string<\App\Models\InvoicePackage>
|
|
*/
|
|
#[\Override]
|
|
protected $model = InvoicePackage::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'name' => fake()->words(3, true),
|
|
'amount' => fake()->randomFloat(2, 1, 1000),
|
|
'published' => fake()->boolean(75),
|
|
];
|
|
}
|
|
}
|