<?php

namespace Saswp\DTOs\Response;

class PropertyHouseRuleDTO
{
    public readonly int $id;
    public readonly string $name;
    public readonly string $active;

    public function __construct(array $_data)
    {
        $this->id  = isset($_data['id']) ?$_data['id']:0;
        $this->name  = isset($_data['name']) ?$_data['name']:'';
        $this->active  = isset($_data['active']) ?$_data['active']:'';
    }

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