<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* inscritnewsletter
*
* @ORM\Table(name="inscritnewsletter")
* @ORM\Entity(repositoryClass="App\Repository\InscritNewsletterRepository")
*/
class InscritNewsletter
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="email", type="string", length=255, unique=true)
* @Assert\Email(
* message = "The email '{{ value }}' is not a valid email.",
* )
*/
private $email;
/**
* @var \DateTime
*
* @ORM\Column(name="dateinscription", type="datetime")
*/
private $dateinscription;
/**
* @var int
*
* @ORM\Column(name="etat", type="smallint")
*/
private $etat;
public function __construct()
{
$this->dateinscription = new \DateTime('now');
$this->etat = 1;
}
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set email
*
* @param string $email
*
* @return InscritNewsletter
*/
public function setEmail($email)
{
$this->email = $email;
return $this;
}
/**
* Get email
*
* @return string
*/
public function getEmail()
{
return $this->email;
}
/**
* Set dateinscription
*
* @param \DateTime $dateinscription
*
* @return InscritNewsletter
*/
public function setDateinscription($dateinscription)
{
$this->dateinscription = $dateinscription;
return $this;
}
/**
* Get dateinscription
*
* @return \DateTime
*/
public function getDateinscription()
{
return $this->dateinscription;
}
/**
* Set etat
*
* @param integer $etat
*
* @return InscritNewsletter
*/
public function setEtat($etat)
{
$this->etat = $etat;
return $this;
}
/**
* Get etat
*
* @return int
*/
public function getEtat()
{
return $this->etat;
}
}