<?php
namespace App\Entity;
use App\Repository\NewsLetterUserRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass:NewsLetterUserRepository::class )]
class NewsLetterUser
{
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(type: 'integer', unique: true)]
private $id;
#[ORM\Column(type: 'string', length: 40)]
private $nom;
#[ORM\Column(type: 'string', length: 40)]
private $prenom;
#[ORM\Column(type: 'string', length: 40)]
private $mail;
#[ORM\Column(type: 'string', length: 40)]
private $ville;
#[ORM\Column(type: 'string', length: 40)]
private $code_postal;
#[ORM\OneToOne(targetEntity:User::class, cascade: ["persist", "remove"])]
private $user_id;
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getPrenom(): ?string
{
return $this->prenom;
}
public function setPrenom(string $prenom): self
{
$this->prenom = $prenom;
return $this;
}
public function getMail(): ?string
{
return $this->mail;
}
public function setMail(string $mail): self
{
$this->mail = $mail;
return $this;
}
public function getVille(): ?string
{
return $this->ville;
}
public function setVille(string $ville): self
{
$this->ville = $ville;
return $this;
}
public function getCodePostal(): ?string
{
return $this->code_postal;
}
public function setCodePostal(string $code_postal): self
{
$this->code_postal = $code_postal;
return $this;
}
public function getUserId(): ?User
{
return $this->user_id;
}
public function setUserId(?User $user_id): self
{
$this->user_id = $user_id;
return $this;
}
}