35 lines
825 B
PHP
35 lines
825 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Enums\TicketWorklogEntryType;
|
|
use App\Models\Ticket;
|
|
use App\Models\TicketWorklogEntry;
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends Factory<TicketWorklogEntry>
|
|
*/
|
|
class TicketWorklogEntryFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'actor_id' => User::factory(),
|
|
'changes' => [
|
|
'from' => 'Backlog',
|
|
'to' => 'In Progress',
|
|
],
|
|
'entry_type' => TicketWorklogEntryType::StatusChanged,
|
|
'summary' => 'Moved from Backlog to In Progress.',
|
|
'ticket_id' => Ticket::factory(),
|
|
];
|
|
}
|
|
}
|