<?php

namespace App\Http\Resources\MasterData;

use App\Http\Resources\BaseResource;
use Illuminate\Http\Request;

class ContactPersonResource extends BaseResource
{
    public function toArray(Request $request): array
    {
        return [
            'id' => $this->id,
            'name' => $this->name,
            'designation' => $this->designation,
            'phone' => $this->phone,
            'email' => $this->email,
            'is_primary' => (bool) $this->is_primary,
        ];
    }
}
