<?php

namespace App\Helpers;

use App\Models\PriorityModel;

class PriorityMapper
{
  public function toPriority(array $row): PriorityModel
  {
    // id_prioritas, nama_prioritas, level, deskripsi, created_at, updated_at
    return new PriorityModel(
      id: $row["id_prioritas"],
      namaPrioritas: $row["nama_prioritas"],
      level: (int) $row["level"],
      deskripsi: $row["deskripsi"],
      createdAt: $row["created_at"],
      updatedAt: $row["updated_at"]
    );
  }
}
