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

    function __construct($params = array())
    {
        $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;
    }

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

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

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

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

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

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

    function getTags()
    {
        return '';
    }

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

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