<?php
namespace Products\NotificationsBundle\Entity\ContactAttempts;
use App\Entity\System\SocialAccounts\TwitterSocialAccount;
use Doctrine\ORM\Mapping as ORM;
use Products\NotificationsBundle\Entity\AbstractContactAttempt;
/**
* Class TwitterContactAttempt
* @package Products\NotificationsBundle\Entity\ContactAttepmts
*
* @ORM\Entity(
* repositoryClass = "Products\NotificationsBundle\Doctrine\Repository\ContactAttempts\TwitterContactAttemptRepository",
* )
*/
class TwitterContactAttempt extends AbstractServiceContactAttempt
{
const DISCR = 'twitter';
const STATUSES = [
...self::PENDING_STATUSES,
...self::SUCCESSFUL_STATUSES,
...self::FAILED_STATUSES,
];
const PENDING_STATUSES = [
...AbstractContactAttempt::PENDING_STATUSES,
];
const SUCCESSFUL_STATUSES = [
...AbstractContactAttempt::SUCCESSFUL_STATUSES,
];
const FAILED_STATUSES = [
...AbstractContactAttempt::FAILED_STATUSES,
];
/**
* @var TwitterSocialAccount|null
*
* @ORM\ManyToOne(
* targetEntity = "App\Entity\System\SocialAccounts\TwitterSocialAccount",
* )
* @ORM\JoinColumn(
* name = "twitterAccount",
* referencedColumnName = "id",
* nullable = true,
* onDelete = "SET NULL",
* )
*/
protected ?TwitterSocialAccount $twitterAccount = null;
/**
* @return TwitterSocialAccount|null
*/
public function getTwitterAccount(): ?TwitterSocialAccount
{
return $this->twitterAccount;
}
/**
* @param TwitterSocialAccount|null $twitterAccount
* @return $this
*/
public function setTwitterAccount(?TwitterSocialAccount $twitterAccount): self
{
$this->twitterAccount = $twitterAccount;
return $this;
}
}