<?php declare(strict_types=1); namespace MailPoet\Entities; if (!defined('ABSPATH')) exit; use MailPoet\Doctrine\EntityTraits\AutoincrementedIdTrait; use MailPoet\Doctrine\EntityTraits\CreatedAtTrait; use MailPoet\Doctrine\EntityTraits\SafeToOneAssociationLoadTrait; use MailPoetVendor\Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity() * @ORM\Table(name="statistics_bounces") */ class StatisticsBounceEntity { use AutoincrementedIdTrait; use CreatedAtTrait; use SafeToOneAssociationLoadTrait; /** * @ORM\ManyToOne(targetEntity="MailPoet\Entities\NewsletterEntity") * @ORM\JoinColumn(name="newsletter_id", referencedColumnName="id") * @var NewsletterEntity|null */ private $newsletter; /** * @ORM\ManyToOne(targetEntity="MailPoet\Entities\SendingQueueEntity") * @ORM\JoinColumn(name="queue_id", referencedColumnName="id") * @var SendingQueueEntity|null */ private $queue; /** * @ORM\ManyToOne(targetEntity="MailPoet\Entities\SubscriberEntity") * @ORM\JoinColumn(name="subscriber_id", referencedColumnName="id") * @var SubscriberEntity|null */ private $subscriber; public function __construct( NewsletterEntity $newsletter, SendingQueueEntity $queue, SubscriberEntity $subscriber ) { $this->newsletter = $newsletter; $this->queue = $queue; $this->subscriber = $subscriber; } }