<?php
namespace App\Models;

/**
 * Notification Model
 */
class Notification
{
    public $id;
    public $user_didar_id;
    public $type;
    public $title;
    public $message;
    public $entity_type;
    public $entity_id;
    public $is_read;
    public $read_at;
    public $show_popup;
    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);
    }
}

