src/Entity/Extranet/AlertUser.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Extranet;
  3. use App\Annotation\SiteAware;
  4. use App\Entity\AbstractBase;
  5. use App\Entity\Interfaces\SiteInterface;
  6. use App\Entity\Traits\SiteTrait;
  7. use App\Entity\User;
  8. use App\Repository\Extranet\AlertUserRepository;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. /**
  12.  * @ORM\Table(name="vulco_alert_user", indexes={@ORM\Index(name="alert_user_address_site_idx", columns={"site"})})
  13.  * @ORM\Entity(repositoryClass=AlertUserRepository::class)
  14.  * @Gedmo\SoftDeleteable(fieldName="removedAt", timeAware=false)
  15.  * @SiteAware(siteFieldName="site")
  16.  */
  17. class AlertUser extends AbstractBase implements SiteInterface
  18. {
  19.     use SiteTrait;
  20.     /**
  21.      * @ORM\Column(type="boolean", nullable=false, options={"default": 0})
  22.      */
  23.     private bool $accepted false;
  24.     /**
  25.      * @ORM\Column(type="datetime", nullable=true)
  26.      */
  27.     private ?\DateTimeInterface $firstShownDate null;
  28.     /**
  29.      * @ORM\Column(type="datetime", nullable=true)
  30.      */
  31.     private ?\DateTimeInterface $acceptedDate null;
  32.     /**
  33.      * @ORM\ManyToOne(targetEntity="App\Entity\Extranet\Alert")
  34.      * @ORM\JoinColumn(name="alert_id", referencedColumnName="id")
  35.      */
  36.     private ?Alert $alert null;
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity="App\Entity\User")
  39.      * @ORM\JoinColumn(name="user_id", referencedColumnName="id")
  40.      */
  41.     private ?User $user null;
  42.     public function isAccepted(): bool
  43.     {
  44.         return $this->accepted;
  45.     }
  46.     public function getAccepted(): bool
  47.     {
  48.         return $this->isAccepted();
  49.     }
  50.     public function setAccepted(bool $accepted): self
  51.     {
  52.         $this->accepted $accepted;
  53.         return $this;
  54.     }
  55.     public function getFirstShownDate(): ?\DateTimeInterface
  56.     {
  57.         return $this->firstShownDate;
  58.     }
  59.     public function setFirstShownDate(?\DateTimeInterface $firstShownDate): self
  60.     {
  61.         $this->firstShownDate $firstShownDate;
  62.         return $this;
  63.     }
  64.     public function getAcceptedDate(): ?\DateTimeInterface
  65.     {
  66.         return $this->acceptedDate;
  67.     }
  68.     public function setAcceptedDate(?\DateTimeInterface $acceptedDate): self
  69.     {
  70.         $this->acceptedDate $acceptedDate;
  71.         return $this;
  72.     }
  73.     public function getAlert(): ?Alert
  74.     {
  75.         return $this->alert;
  76.     }
  77.     public function setAlert(?Alert $alert): self
  78.     {
  79.         $this->alert $alert;
  80.         return $this;
  81.     }
  82.     public function getUser(): ?User
  83.     {
  84.         return $this->user;
  85.     }
  86.     public function setUser(?User $user): self
  87.     {
  88.         $this->user $user;
  89.         return $this;
  90.     }
  91. }