<?php

namespace App\Http\Resources\Realty;

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

class DepartmentResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @return array<string, mixed>
     */
    public function toArray(Request $request): array
    {
        return [
            'number_bedrooms' => $this->number_bedrooms,
            'number_bathrooms' => $this->number_bathrooms,
            'floor' => $this->floor,
            'isfacade' => $this->isfacade,
            'type_department_id' => $this->type_department_id,
            'type_department_name' => $this->type_department->name,
            'surface_balcony' => $this->surface_balcony,
            'is_balcony' => $this->is_balcony
        ];
    }
}
