<?php

namespace App\Helpers;

use App\Models\StatusTicketModel;

class StatusTicketMapper
{
  public function toStatusTicket(array $row): StatusTicketModel
  {
    // id_status, nama_status, urutan, deskripsi
    return new StatusTicketModel(
      id: (int) $row["id_status"],
      namaStatus: $row["nama_status"],
      urutan: $row["urutan"] !== null ? (int) $row["urutan"] : null,
      deskripsi: $row["deskripsi"]
    );
  }
}
