src/Entity/Marketing/EmailSubscribe/Subscriber.php line 15
<?php
namespace App\Entity\Marketing\EmailSubscribe;
use App\Entity\Traits\ActiveTrait;
use App\Entity\User\User;
use Doctrine\ORM\Mapping as ORM;
/**
* Class Subscriber
* @package App\Entity\Marketing\EmailSubscribe
*/
#[ORM\Table(name: 'subscribe_subscriber')]
#[ORM\Entity(repositoryClass: 'App\Repository\Marketing\EmailSubscribe\SubscriberRepository')]
class Subscriber
{
use ActiveTrait;
/**
* @var ?int
*/
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(type: 'integer')]
private $id;
/**
* @var ?User
*/
#[ORM\ManyToOne(targetEntity: 'App\Entity\User\User')]
#[ORM\JoinColumn(nullable: false)]
private $user;
/**
* @var ?Subscription
*/
#[ORM\ManyToOne(targetEntity: 'App\Entity\Marketing\EmailSubscribe\Subscription', inversedBy: 'subscribers')]
#[ORM\JoinColumn(nullable: false)]
private $subscription;
/**
* @return int|null
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @param int|null $id
*/
public function setId(?int $id): void
{
$this->id = $id;
}
/**
* @return User|null
*/
public function getUser(): ?User
{
return $this->user;
}
/**
* @param User|null $user
*/
public function setUser(?User $user): void
{
$this->user = $user;
}
/**
* @return Subscription|null
*/
public function getSubscription(): ?Subscription
{
return $this->subscription;
}
/**
* @param Subscription|null $subscription
*/
public function setSubscription(?Subscription $subscription): void
{
$this->subscription = $subscription;
}
}