29 lines
660 B
PHP
29 lines
660 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Project;
|
|
use App\Models\TicketFieldDefinition;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<TicketFieldDefinition>
|
|
*/
|
|
class TicketFieldDefinitionFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'field_type' => fake()->randomElement(TicketFieldDefinition::FIELD_TYPES),
|
|
'label' => fake()->unique()->words(2, true),
|
|
'position' => 1,
|
|
'project_id' => Project::factory(),
|
|
];
|
|
}
|
|
}
|