src/Entity/NewsLetterUser.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\NewsLetterUserRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClass:NewsLetterUserRepository::class )]
  6. class NewsLetterUser
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue(strategy'AUTO')]
  10.     #[ORM\Column(type'integer'uniquetrue)]
  11.     private $id;
  12.     #[ORM\Column(type'string'length40)]
  13.     private $nom;
  14.     #[ORM\Column(type'string'length40)]
  15.     private $prenom;
  16.     #[ORM\Column(type'string'length40)]
  17.     private $mail;
  18.     #[ORM\Column(type'string'length40)]
  19.     private $ville;
  20.     #[ORM\Column(type'string'length40)]
  21.     private $code_postal;
  22.     #[ORM\OneToOne(targetEntity:User::class, cascade: ["persist""remove"])]
  23.     private $user_id;
  24.     public function getId(): ?int
  25.     {
  26.         return $this->id;
  27.     }
  28.     public function getNom(): ?string
  29.     {
  30.         return $this->nom;
  31.     }
  32.     public function setNom(string $nom): self
  33.     {
  34.         $this->nom $nom;
  35.         return $this;
  36.     }
  37.     public function getPrenom(): ?string
  38.     {
  39.         return $this->prenom;
  40.     }
  41.     public function setPrenom(string $prenom): self
  42.     {
  43.         $this->prenom $prenom;
  44.         return $this;
  45.     }
  46.     public function getMail(): ?string
  47.     {
  48.         return $this->mail;
  49.     }
  50.     public function setMail(string $mail): self
  51.     {
  52.         $this->mail $mail;
  53.         return $this;
  54.     }
  55.     public function getVille(): ?string
  56.     {
  57.         return $this->ville;
  58.     }
  59.     public function setVille(string $ville): self
  60.     {
  61.         $this->ville $ville;
  62.         return $this;
  63.     }
  64.     public function getCodePostal(): ?string
  65.     {
  66.         return $this->code_postal;
  67.     }
  68.     public function setCodePostal(string $code_postal): self
  69.     {
  70.         $this->code_postal $code_postal;
  71.         return $this;
  72.     }
  73.     public function getUserId(): ?User
  74.     {
  75.         return $this->user_id;
  76.     }
  77.     public function setUserId(?User $user_id): self
  78.     {
  79.         $this->user_id $user_id;
  80.         return $this;
  81.     }
  82. }