<?php

namespace App\Api\Http\Resources\Units;

use Illuminate\Http\Resources\Json\JsonResource;

class UnitsResource extends JsonResource
{

    public function toArray($request): array
    {
        return [
            'id' => (string)$this->id ?? '',
            'name' => (string)$this->ap_no ?? '',
            'floor' => (string)$this->floor ?? '',
            'apartment_type' => (string)$this->apartment_type ?? '',
            'carpet_area' => (string)$this->carpet_area ?? '',
            'sba_area' => (string)$this->sba_area ?? '',
            'extended_balcony_area' => (string)$this->extended_balcony_area ?? '',
            'total_sba' => (string)$this->total_sba ?? '',
            'sale_value' => (string)$this->sale_value ?? '',
            'rate_per_sqft' => (string)$this->rate_per_sqft ?? '',
            'rate_per_sba' => (string)$this->rate_per_sba ?? '',
            'taxable_amount' => (string)$this->taxable_amount ?? '',
            'grand_total' => (string)$this->grand_total ?? '',
            'car_parking' => (string)$this->car_parking ?? '',
        ];
    }
}
