36 lines
852 B
PHP
36 lines
852 B
PHP
<?php
|
|
|
|
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),
|
|
];
|
|
}
|
|
}
|