Notification.php 799 Bytes
<?php

namespace FootyRoom\Core\Notification;

use DateTime;

class Notification
{
    /**
     * @var int
     */
    protected $id;

    /**
     * @var int
     */
    protected $userId;

    /**
     * @var string
     */
    protected $type;

    /**
     * @var string
     */
    protected $content;

    /**
     * @var bool
     */
    protected $isRead;

    /**
     * @var \DateTime
     */
    protected $createdAt;

    /**
     * Constructor.
     *
     * @param int $userId
     * @param string $type
     * @param string $content
     */
    public function __construct($userId, $type, $content)
    {
        $this->userId = $userId;
        $this->type = $type;
        $this->content = $content;
        $this->createdAt = new DateTime();
        $this->isRead = false;
    }
}