- Added database migrations for tickets, statuses, roles, users, and related associations. - Introduced models and enums for ticket status, permissions, and notifications. - Implemented `TicketService` for ticket management and notification handling. - Created Livewire form and UI for raising tickets with file attachments and routing options. - Added tests covering ticket creation, validation, notifications, and file uploads.
45 lines
1.0 KiB
PHP
45 lines
1.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Enums\TicketStatusEnum;
|
|
use App\Models\TicketStatus;
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class TicketStatusSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
$data = [
|
|
[
|
|
'name' => 'Open',
|
|
'slug' => TicketStatusEnum::Open->value,
|
|
'created_at' => now(),
|
|
],
|
|
[
|
|
'name' => 'In Progress',
|
|
'slug' => TicketStatusEnum::InProgress->value,
|
|
'created_at' => now(),
|
|
],
|
|
[
|
|
'name' => 'Resolved',
|
|
'slug' => TicketStatusEnum::Resolved->value,
|
|
'created_at' => now(),
|
|
],
|
|
[
|
|
'name' => 'Closed',
|
|
'slug' => TicketStatusEnum::Closed->value,
|
|
'created_at' => now(),
|
|
],
|
|
];
|
|
|
|
TicketStatus::query()
|
|
->upsert($data, ['slug'], ['name', 'updated_at']);
|
|
}
|
|
}
|