Ubah dari Swagger ke Dedoc lalu buat API Ticket dan TicketType

This commit is contained in:
Wian Drs
2026-06-20 00:12:19 +07:00
parent 2f805a233d
commit 2dc461ae89
1283 changed files with 36405 additions and 89470 deletions
@@ -0,0 +1,31 @@
<?php
namespace App\Http\Resources\Ticket;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class TicketResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'ticket_no' => $this->ticket_no,
'ticket_type_id' => $this->ticket_type_id,
'customer_id' => $this->customer_id,
'title' => $this->title,
'description' => $this->description,
'priority' => $this->priority,
'status' => $this->status,
'created_by' => $this->created_by,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
];
}
}
@@ -0,0 +1,27 @@
<?php
namespace App\Http\Resources\TicketType;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class TicketTypeResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'code' => $this->code,
'name' => $this->name,
'need_approval' => $this->need_approval,
'sla_minutes' => $this->sla_minutes,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
];
}
}