<?php

namespace App\Modules\Customization\CustomFields\Resources;

use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

/**
 * @mixin \App\Modules\Customization\CustomFields\Models\CustomField
 */
class CustomFieldResource extends JsonResource
{
    /**
     * @return array<string, mixed>
     */
    public function toArray(Request $request): array
    {
        return [
            'id' => $this->id,
            'slug' => $this->slug,
            'name' => $this->name,
            'field_type' => $this->field_type,
            'is_active' => $this->is_active,
        ];
    }
}
