src/Entity/Adherent/MagasinAlert.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Adherent;
  3. use App\Entity\adherent\magasin;
  4. use App\Repository\Adherent\MagasinAlertRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassMagasinAlertRepository::class)]
  7. #[ORM\HasLifecycleCallbacks]
  8. class MagasinAlert
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $type null;
  16.     #[ORM\Column]
  17.     private ?\DateTimeImmutable $updated_at null;
  18.     #[ORM\Column]
  19.     private ?bool $active null;
  20.     #[ORM\ManyToOne(inversedBy'magasinAlerts')]
  21.     #[ORM\JoinColumn(referencedColumnName"k_adherent"nullablefalse)]
  22.     private ?magasin $magasin null;
  23.     #[ORM\PreUpdate]
  24.     public function onPreUpdateEntity(): void
  25.     {
  26.         $this->updated_at = new \DateTimeImmutable('now');
  27.     }
  28.     public function getId(): ?int
  29.     {
  30.         return $this->id;
  31.     }
  32.     public function getType(): ?string
  33.     {
  34.         return $this->type;
  35.     }
  36.     public function setType(string $type): self
  37.     {
  38.         $this->type $type;
  39.         return $this;
  40.     }
  41.     public function getUpdatedAt(): ?\DateTimeImmutable
  42.     {
  43.         return $this->updated_at;
  44.     }
  45.     public function setUpdatedAt(\DateTimeImmutable $updated_at): self
  46.     {
  47.         $this->updated_at $updated_at;
  48.         return $this;
  49.     }
  50.     public function isActive(): ?bool
  51.     {
  52.         return $this->active;
  53.     }
  54.     public function setActive(bool $active): self
  55.     {
  56.         $this->active $active;
  57.         return $this;
  58.     }
  59.     public function getMagasin(): ?magasin
  60.     {
  61.         return $this->magasin;
  62.     }
  63.     public function setMagasin(?magasin $magasin): self
  64.     {
  65.         $this->magasin $magasin;
  66.         return $this;
  67.     }
  68. }