<?php
namespace App\Entity;
use App\Repository\NewslettersRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
#[ORM\Entity(repositoryClass: NewslettersRepository::class)]
class Newsletters
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id;
#[ORM\Column(type: "string",length: 225)]
private ?string $email;
#[ORM\Column]
private ?\DateTimeImmutable $created_at = null;
#[ORM\Column]
private ?\DateTimeImmutable $updated_at = null;
public function __construct(){
$this->note = 0;
$this->created_at = new \DateTimeImmutable();
$this->updated_at = new \DateTimeImmutable();
}
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;
}
public function getCreatedAt(): ?\DateTimeImmutable
{ return $this->created_at; }
public function setCreatedAt(\DateTimeImmutable $created_at): static
{ $this->created_at = $created_at;
return $this;
}
public function getUpdatedAt(): ?\DateTimeImmutable
{ return $this->updated_at; }
public function UpdatedAt(\DateTimeImmutable $updated_at): static
{ $this->updated_at = $updated_at;
return $this;
}
}