<?php

namespace App\Transformers\Income;

use App\Models\Income\InvoiceStatus as Model;
use League\Fractal\TransformerAbstract;

class InvoiceStatus extends TransformerAbstract
{
    /**
     * @param Model $model
     * @return array
     */
    public function transform(Model $model)
    {
        return [
            'id' => $model->id,
            'company_id' => $model->company_id,
            'name' => $model->name,
            'code' => $model->code,
            'created_at' => $model->created_at->toIso8601String(),
            'updated_at' => $model->updated_at->toIso8601String(),
        ];
    }
}
