Create score columns
[MAILPOET-3525]
This commit is contained in:
@ -216,6 +216,8 @@ class Migrator {
|
|||||||
'count_confirmations int(11) unsigned NOT NULL DEFAULT 0,',
|
'count_confirmations int(11) unsigned NOT NULL DEFAULT 0,',
|
||||||
'unsubscribe_token char(15) NULL,',
|
'unsubscribe_token char(15) NULL,',
|
||||||
'link_token char(32) NULL,',
|
'link_token char(32) NULL,',
|
||||||
|
'engagement_score tinyint unsigned NULL,',
|
||||||
|
'engagement_score_updated_at timestamp NULL,',
|
||||||
'PRIMARY KEY (id),',
|
'PRIMARY KEY (id),',
|
||||||
'UNIQUE KEY email (email),',
|
'UNIQUE KEY email (email),',
|
||||||
'UNIQUE KEY unsubscribe_token (unsubscribe_token),',
|
'UNIQUE KEY unsubscribe_token (unsubscribe_token),',
|
||||||
|
@ -125,6 +125,17 @@ class SubscriberEntity {
|
|||||||
*/
|
*/
|
||||||
private $linkToken;
|
private $linkToken;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="integer")
|
||||||
|
* @var int|null
|
||||||
|
*/
|
||||||
|
private $engagementScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="datetimetz", nullable=true)
|
||||||
|
* @var DateTimeInterface|null
|
||||||
|
*/
|
||||||
|
private $engagementScoreUpdatedAt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\OneToMany(targetEntity="MailPoet\Entities\SubscriberSegmentEntity", mappedBy="subscriber")
|
* @ORM\OneToMany(targetEntity="MailPoet\Entities\SubscriberSegmentEntity", mappedBy="subscriber")
|
||||||
@ -397,4 +408,32 @@ class SubscriberEntity {
|
|||||||
return $segment !== null;
|
return $segment !== null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return int|null
|
||||||
|
*/
|
||||||
|
public function getEngagementScore(): ?int {
|
||||||
|
return $this->engagementScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int|null $engagementScore
|
||||||
|
*/
|
||||||
|
public function setEngagementScore(?int $engagementScore): void {
|
||||||
|
$this->engagementScore = $engagementScore;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return DateTimeInterface|null
|
||||||
|
*/
|
||||||
|
public function getEngagementScoreUpdatedAt(): ?DateTimeInterface {
|
||||||
|
return $this->engagementScoreUpdatedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param DateTimeInterface|null $engagementScoreUpdatedAt
|
||||||
|
*/
|
||||||
|
public function setEngagementScoreUpdatedAt(?DateTimeInterface $engagementScoreUpdatedAt): void {
|
||||||
|
$this->engagementScoreUpdatedAt = $engagementScoreUpdatedAt;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user