<?php

namespace Speakers\Speaker\Repositories\Presenter;

use League\Fractal\TransformerAbstract;
use Hashids;

class PersonListTransformer extends TransformerAbstract
{
    public function transform(\Speakers\Speaker\Models\Person $person)
    {
        return [
            'id'                => $person->getRouteKey(),
            'ID'                => $person->ID,
            'LastName'          => $person->LastName,
            'FirstName'         => $person->FirstName,
            'Age'               => $person->Age,
            'status'            => trans('app.'.$person->status),
            'created_at'        => format_date($person->created_at),
            'updated_at'        => format_date($person->updated_at),
        ];
    }
}