<?php

namespace App\Models;

class Client {
    public ?int $id = null;
    public string $name_company = "";
    public string $name_contact = "";
    public string $phone_contact = "";
    public ?string $email_contact = null;
    public bool $isActive = true;
    
    public function __construct(array $data = []) {
        if (!empty($data)) {
            $this->id = $data['id'] ?? null;
            $this->name_company = $data['name_company'] ?? '';
            $this->name_contact = $data['name_contact'] ?? '';
            $this->phone_contact = $data['phone_contact'] ?? '';
            $this->email_contact = $data['email_contact'] ?? null;
            $this->isActive = isset($data['isActive']) ? (bool)$data['isActive'] : true;
        }
    }
}