<?php

namespace Saswp\DTOs\Response\Vendor\VendorGroup;

class PropertyPostDTO
{

    public readonly int $id;
    public readonly string $title;
    public readonly string $meta_title;
    public readonly string $meta_description;
    public readonly string $description;


    public function __construct(array $_data)
    {
        $this->id  = isset($_data['id']) ?$_data['id']:'';
        $this->title  = isset($_data['title']) ?$_data['title']:'';
        $this->meta_title = isset($_data['meta_title']) ?$_data['meta_title']:'';
        $this->meta_description = isset($_data['meta_description']) ?$_data['meta_description']:'';
        $this->description = isset($_data['description']) ?$_data['description']:'';
    }

    public function toArray(): array
    {
        return (array)$this;
    }
}