<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repository\SubscriptionRepository")
* @UniqueEntity("email")
*/
class Subscription
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string")
*/
private $countryCode;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $phoneNumber;
/**
* @ORM\Column(type="string", length=255, unique=true, nullable=false)
*/
private $email;
private $optIn;
public function getId(): ?int
{
return $this->id;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
/**
* Get the value of countryCode
*/
public function getCountryCode()
{
return $this->countryCode;
}
/**
* Set the value of countryCode
*
* @return self
*/
public function setCountryCode($countryCode)
{
$this->countryCode = $countryCode;
return $this;
}
/**
* Get the value of phoneNumber
*/
public function getPhoneNumber()
{
return $this->phoneNumber;
}
/**
* Set the value of phoneNumber
*
* @return self
*/
public function setPhoneNumber($phoneNumber)
{
$this->phoneNumber = $phoneNumber;
return $this;
}
/**
* Get the value of optIn
*/
public function getOptIn()
{
return $this->optIn;
}
/**
* Set the value of optIn
*
* @return self
*/
public function setOptIn($optIn)
{
$this->optIn = $optIn;
return $this;
}
}