Add WooCommerce purchases relation to statistics clicks entity
[PREMIUM-145]
This commit is contained in:
committed by
Veljko V
parent
cbc4820c6a
commit
aee2d82396
@@ -6,6 +6,7 @@ use MailPoet\Doctrine\EntityTraits\AutoincrementedIdTrait;
|
||||
use MailPoet\Doctrine\EntityTraits\CreatedAtTrait;
|
||||
use MailPoet\Doctrine\EntityTraits\SafeToOneAssociationLoadTrait;
|
||||
use MailPoet\Doctrine\EntityTraits\UpdatedAtTrait;
|
||||
use MailPoetVendor\Doctrine\Common\Collections\ArrayCollection;
|
||||
use MailPoetVendor\Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
@@ -45,6 +46,12 @@ class StatisticsClickEntity {
|
||||
*/
|
||||
private $link;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="MailPoet\Entities\StatisticsWooCommercePurchaseEntity", mappedBy="click", fetch="EXTRA_LAZY")*
|
||||
* @var StatisticsWooCommercePurchaseEntity[]|ArrayCollection
|
||||
*/
|
||||
private $wooCommercePurchases;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="integer")
|
||||
* @var int
|
||||
@@ -63,6 +70,7 @@ class StatisticsClickEntity {
|
||||
$this->subscriber = $subscriber;
|
||||
$this->link = $link;
|
||||
$this->count = $count;
|
||||
$this->wooCommercePurchases = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -123,4 +131,11 @@ class StatisticsClickEntity {
|
||||
public function setCount(int $count) {
|
||||
$this->count = $count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return StatisticsWooCommercePurchaseEntity[]|ArrayCollection
|
||||
*/
|
||||
public function getWooCommercePurchases() {
|
||||
return $this->wooCommercePurchases;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user