<?php

namespace Saswp\DTOs\Response\Vendor;

class ShowLeanFullDTO
{

    public readonly int $id;
    public readonly string $business_name;
    public readonly string $trading_name;
    public readonly string $email;
    public readonly string $website;
    public readonly int $active;
    public readonly string $charge_type;
    public readonly string $currency_code;
    public readonly string $publishing_type;
    public readonly string $birth_date;

    public function __construct(array $_data)
    {
        $this->id  = isset($_data['id']) ?$_data['id']:0;
        $this->business_name  = isset($_data['business_name']) ?$_data['business_name']:'';
        $this->trading_name  = isset($_data['trading_name']) ?$_data['trading_name']:'';
        $this->email  = isset($_data['email']) ?$_data['email']:'';
        $this->website  = isset($_data['website']) ?$_data['website']:'';
        $this->active  = isset($_data['active']) ?$_data['active']:0;
        $this->charge_type  = isset($_data['charge_type']) ?$_data['charge_type']:'';
        $this->currency_code  = isset($_data['currency_code']) ?$_data['currency_code']:'';
        $this->publishing_type  = isset($_data['publishing_type']) ?$_data['publishing_type']:'';
        $this->birth_date  = isset($_data['birth_date']) ?$_data['birth_date']:'';
    }

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