<?php
namespace App\Models;

class Product
{
    public $id;
    public $name;
    public $service_lookup_item_id;
    public $service_lookup_code;
    public $service_lookup_value;
    public $service_lookup_title;
    public $created_at;

    public function __construct(array $data = [])
    {
        foreach ($data as $key => $value) {
            if (property_exists($this, $key)) {
                $this->$key = $value;
            }
        }
    }

    public function toArray()
    {
        return get_object_vars($this);
    }
}
