<?php
class CF_Event
{
    public $id;
    public $username;
    public $item_id; //
    public $item_name; //
    public $item_type; // checks, email, ....
    public $status; // 'fail' : 'success';
    public $message;
    public $tags; // array of tags
    public $time; // time when ot was created
    public $severity; // low, high...

    public function __construct($params = [])
    {
        $this->id = isset($params['_id']) ? $params['_id']->__toString() : null;
        $this->username = isset($params['username']) ? $params['username'] : null;
        $this->item_id = isset($params['item_id']) ? $params['item_id'] : null;
        $this->item_name = isset($params['item_name']) ? $params['item_name'] : null;
        $this->item_type = isset($params['item_type']) ? $params['item_type'] : null;
        $this->status = isset($params['status']) ? $params['status'] : null;
        $this->message = isset($params['message']) ? $params['message'] : null;
        $this->tags = isset($params['tags']) ? $params['tags'] : null;
        $this->time = isset($params['time']) ? $params['time'] : null;
        $this->severity = isset($params['severity']) ? $params['severity'] : null;
    }

    public function getId()
    {
        return $this->id;
    }

    public function getUsername()
    {
        return $this->username;
    }

    public function getItemId()
    {
        return $this->item_id;
    }

    public function getItemName()
    {
        return $this->item_name;
    }
    public function getItemType()
    {
        return $this->item_type;
    }

    public function getStatus()
    {
        return $this->status;
    }

    public function getMessage()
    {
        return $this->message;
    }

    public function getTags()
    {
        return '';
    }

    public function getTime()
    {
        return $this->time;
    }

    public function getSeverity()
    {
        return $this->severity;
    }
}
