<?php

namespace App\Helpers;

use App\Models\TicketAssignmentModel;

class TicketAssignmentMapper
{
  public function toTicketAssignment(array $row): TicketAssignmentModel
  {
    return new TicketAssignmentModel(
      id: (int) $row['id_assignment'],
      ticketId: (int) $row['id_ticket'],
      teknisiId: (int) $row['id_teknisi'],
      statusId: (int) $row['id_status'],
      tanggalDitugaskan: $row['tanggal_ditugaskan'],
      tanggalSelesai: $row['tanggal_selesai'],
      statusPenugasan: $row['status_penugasan'],
      catatan: $row['catatan'],
    );
  }
}
