Add dynamic segments filter entity
[MAILPOET-3077]
This commit is contained in:
committed by
Veljko V
parent
814686e8d2
commit
d18d3b052d
@ -6,6 +6,7 @@ use MailPoet\Doctrine\EntityTraits\AutoincrementedIdTrait;
|
||||
use MailPoet\Doctrine\EntityTraits\CreatedAtTrait;
|
||||
use MailPoet\Doctrine\EntityTraits\DeletedAtTrait;
|
||||
use MailPoet\Doctrine\EntityTraits\UpdatedAtTrait;
|
||||
use MailPoetVendor\Doctrine\Common\Collections\ArrayCollection;
|
||||
use MailPoetVendor\Doctrine\ORM\Mapping as ORM;
|
||||
use MailPoetVendor\Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
@ -43,6 +44,19 @@ class SegmentEntity {
|
||||
*/
|
||||
private $description;
|
||||
|
||||
/**
|
||||
* @ORM\OneToMany(targetEntity="MailPoet\Entities\DynamicSegmentFilterEntity", mappedBy="segment")
|
||||
* @var DynamicSegmentFilterEntity[]|ArrayCollection
|
||||
*/
|
||||
private $dynamicFilters;
|
||||
|
||||
public function __construct(string $name, string $type, string $description = '') {
|
||||
$this->name = $name;
|
||||
$this->type = $type;
|
||||
$this->description = $description;
|
||||
$this->dynamicFilters = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
@ -84,4 +98,11 @@ class SegmentEntity {
|
||||
public function setDescription($description) {
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DynamicSegmentFilterEntity[]|ArrayCollection
|
||||
*/
|
||||
public function getDynamicFilters() {
|
||||
return $this->dynamicFilters;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user