<?php

namespace App\Transformers\Users;

use App\Models\Permission;
use League\Fractal\TransformerAbstract;

class PermissionTransformer extends TransformerAbstract {
    public function transform(Permission $model): array {
        return [
            'id' => $model->uuid,
            'name' => $model->name,
            'createdAt' => $model->created_at->toIso8601String(),
            'updatedAt' => $model->updated_at->toIso8601String()
        ];
    }
}
