<?php
namespace App\Models;

/**
 * Person Model
 */
class Person
{
    public $id;
    public $didar_contact_id;
    public $owner_didar_id;
    public $previous_owner_id;
    public $previous_owner_history;
    public $code;
    public $customer_code;
    public $first_name;
    public $last_name;
    public $mobile_phone;
    public $secondary_mobile_phone;
    public $mobile_phone_3;
    public $mobile_phone_4;
    public $work_phone;
    public $email;
    public $contact_type;
    public $city;
    public $job_title;
    public $job_description;
    public $acquaintance_duration;
    public $extra_info;
    public $financial_level;
    public $asset_estimation;
    public $income_estimation;
    public $requested_services;
    public $customer_level;
    public $customer_level_notes;
    public $acquaintance_source;
    public $acquaintance_detail;
    public $content_topic;
    public $national_id;
    public $has_previous_purchase;
    public $sale_status;
    public $birth_date;
    public $register_time_jalali;
    public $register_time;
    public $visibility_type;
    public $background_info;
    public $customer_products;
    public $last_sync;
    public $raw_json;
    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);
    }
}

