src/Entity/SMS.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\User\User;
  4. use App\Repository\SMSRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassSMSRepository::class)]
  7. class SMS
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     private $id;
  13.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'sms'cascade: ['persist''remove'])]
  14.     private $user;
  15.     #[ORM\Column(type'string'length255)]
  16.     private $code;
  17.     #[ORM\Column(type'boolean'nullabletrue)]
  18.     private $activity;
  19.     public function getId(): ?int
  20.     {
  21.         return $this->id;
  22.     }
  23.     public function getUser(): ?User
  24.     {
  25.         return $this->user;
  26.     }
  27.     public function setUser(?User $user): self
  28.     {
  29.         $this->user $user;
  30.         return $this;
  31.     }
  32.     public function getCode(): ?string
  33.     {
  34.         return $this->code;
  35.     }
  36.     public function setCode(string $code): self
  37.     {
  38.         $this->code $code;
  39.         return $this;
  40.     }
  41.     public function getActivity(): ?bool
  42.     {
  43.         return $this->activity;
  44.     }
  45.     public function setActivity(?bool $activity): self
  46.     {
  47.         $this->activity $activity;
  48.         return $this;
  49.     }
  50. }