src/Entity/Alert.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AlertRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassAlertRepository::class)]
  7. #[ORM\HasLifecycleCallbacks]
  8. class Alert
  9. {
  10.     const SMS 'SMS';
  11.     const EMAIL =  'EMAIL';
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $type null;
  18.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  19.     private ?\DateTimeInterface $date null;
  20.     public function getId(): ?int
  21.     {
  22.         return $this->id;
  23.     }
  24.     public function getType(): ?string
  25.     {
  26.         return $this->type;
  27.     }
  28.     public function setType(string $type): static
  29.     {
  30.         $this->type $type;
  31.         return $this;
  32.     }
  33.     public function getDate(): ?\DateTimeInterface
  34.     {
  35.         return $this->date;
  36.     }
  37.     public function setDate(\DateTimeInterface $date): static
  38.     {
  39.         $this->date $date;
  40.         return $this;
  41.     }
  42. }