<?php

declare(strict_types=1);

namespace KupShop\OrderingBundle\Event;

use Symfony\Contracts\EventDispatcher\Event;

class OrderDeliveryEvent extends Event
{
    /**
     * @var \Order
     */
    private $order;

    /**
     * @var \DateTime
     */
    private $dateDelivered;

    public function __construct(\Order $order, ?\DateTime $dateDelivered = null)
    {
        $this->order = $order;
        $this->dateDelivered = $dateDelivered;
    }

    public function getDateDelivered(): ?\DateTime
    {
        return $this->dateDelivered;
    }

    public function setDateDelivered(?\DateTime $dateDelivered): void
    {
        $this->dateDelivered = $dateDelivered;
    }

    public function getOrder(): \Order
    {
        return $this->order;
    }

    public function setOrder(\Order $order): void
    {
        $this->order = $order;
    }
}
