<?php


namespace App\Helpers;

use App\Models\DivisiModel;

class DivisiMapper
{
  public function toDivisi(array $row): DivisiModel
  {
    //id_divisi, nama_divisi, deskripsi, created_at, updated_at
    return new DivisiModel(
      id: $row["id_divisi"],
      namaDivisi: $row["nama_divisi"],
      deskripsi: $row["deskripsi"],
      createdAt: $row["created_at"],
      updatedAt: $row["updated_at"]
    );
  }
}
