CommentChange.php 1.81 KB
<?php

namespace FootyRoom\Core\Comment;

use DateTime;

class CommentChange
{
    /**
     * @var int
     */
    protected $commentId;

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

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

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

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

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

    /**
     * Constructor.
     *
     * @param int $commentId
     * @param string $action
     * @param int $userId
     * @param string $username
     * @param string $reason
     */
    public function __construct($commentId, $action, $userId, $username, $reason = '')
    {
        $this->commentId = $commentId;
        $this->action = $action;
        $this->userId = $userId;
        $this->username = $username;
        $this->reason = $reason;
        $this->date = new DateTime();
    }

    /**
     * Gets the value of commentId.
     *
     * @return int
     */
    public function getCommentId()
    {
        return $this->commentId;
    }

    /**
     * Gets the value of action.
     *
     * @return string
     */
    public function getAction()
    {
        return $this->action;
    }

    /**
     * Gets the value of userId.
     *
     * @return int
     */
    public function getUserId()
    {
        return $this->userId;
    }

    /**
     * Gets the value of username.
     *
     * @return string
     */
    public function getUsername()
    {
        return $this->username;
    }

    /**
     * Gets the value of reason.
     *
     * @return string
     */
    public function getReason()
    {
        return $this->reason;
    }

    /**
     * Gets the value of date.
     *
     * @return \DateTime
     */
    public function getDate()
    {
        return $this->date;
    }
}