src/Entity/Emailsadmin.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\EmailsadminRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClass: EmailsadminRepository::class)]
  7. #[ApiResource]
  8. class Emailsadmin
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id = null;
  14.     #[ORM\Column(length: 255, nullable: true)]
  15.     private ?string $email = null;
  16.     #[ORM\ManyToOne(inversedBy: 'emailsadmins')]
  17.     private ?User $user = null;
  18.     public function getId(): ?int
  19.     {
  20.         return $this->id;
  21.     }
  22.     public function getEmail(): ?string
  23.     {
  24.         return $this->email;
  25.     }
  26.     public function setEmail(?string $email): self
  27.     {
  28.         $this->email = $email;
  29.         return $this;
  30.     }
  31.     public function getUser(): ?User
  32.     {
  33.         return $this->user;
  34.     }
  35.     public function setUser(?User $user): self
  36.     {
  37.         $this->user = $user;
  38.         return $this;
  39.     }
  40. }