src/Entity/User/Alert.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\User;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Entity\Federation\Race;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. use App\Entity\Media\Document;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use App\Entity\Site\Site;
  9. /**
  10.  * @ORM\Entity(repositoryClass="App\Repository\User\AlertRepository")
  11.  * @ORM\Table(name="alerts")
  12.  * @ORM\HasLifecycleCallbacks
  13.  */
  14. class Alert
  15. {
  16.     /**
  17.      * @ORM\Id()
  18.      * @ORM\GeneratedValue()
  19.      * @ORM\Column(type="integer")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @ORM\Column(name="name", type="string", length=255)
  24.      * @Assert\NotBlank()
  25.      */    
  26.     private $name;
  27.     
  28.     /**
  29.      * @ORM\Column(type="array", nullable=true)
  30.      */
  31.     private $documentsName;
  32.     /**
  33.      * @ORM\ManyToOne(targetEntity="App\Entity\Media\Document", inversedBy="alerts")
  34.      */
  35.     private $document;
  36.     
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity="App\Entity\Site\Site", inversedBy="alerts")
  39.      */
  40.     private $site;
  41.     
  42.     /**
  43.      * @ORM\Column(type="integer")
  44.      */
  45.     private $notification;
  46.     /**
  47.      * @ORM\Column(type="integer")
  48.      * @ORM\Column(name="number_emails_sent", type="integer", nullable=false)
  49.      */
  50.     private $numberEmailsSent;
  51.     
  52.     /**
  53.      * @ORM\Column(type="text", nullable=true)
  54.      */
  55.     private $email;
  56.     /**
  57.      * @ORM\Column(type="datetime")
  58.      * @ORM\Column(name="created_date", type="datetime", nullable=false)
  59.      * @Gedmo\Timestampable(on="create")
  60.      */
  61.     private $createdDate;
  62.     /**
  63.      * @ORM\Column(type="datetime")
  64.      * @ORM\Column(name="updated_date", type="datetime", nullable=true)
  65.      * @Gedmo\Timestampable(on="update")
  66.      */
  67.     private $updatedDate;
  68.     /**
  69.      * @ORM\Column(type="boolean")
  70.      */
  71.     private $status 1;
  72.     public function getId(): ?int
  73.     {
  74.         return $this->id;
  75.     }
  76.     
  77.     public function setName($name)
  78.     {
  79.         $this->name $name;
  80.         
  81.         return $this;
  82.     }
  83.     
  84.     public function getName()
  85.     {
  86.         return $this->name;
  87.     }
  88.     
  89.     public function getSite(): ?Site
  90.     {
  91.         return $this->site;
  92.     }
  93.     
  94.     public function setSite(?Site $site): self
  95.     {
  96.         $this->site $site;
  97.         
  98.         return $this;
  99.     }
  100.     public function getDocumentsName(): ?array
  101.     {
  102.         return $this->documentsName;
  103.     }
  104.     public function setDocumentsName(array $documentsName): self
  105.     {
  106.         $this->documentsName $documentsName;
  107.         return $this;
  108.     }
  109.     public function getNotification(): ?int
  110.     {
  111.         return $this->notification;
  112.     }
  113.     public function setNotification(int $notification): self
  114.     {
  115.         $this->notification $notification;
  116.         return $this;
  117.     }
  118.     public function getNumberEmailsSent(): ?int
  119.     {
  120.         return $this->numberEmailsSent;
  121.     }
  122.     public function setNumberEmailsSent(int $numberEmailsSent): self
  123.     {
  124.         $this->numberEmailsSent $numberEmailsSent;
  125.         return $this;
  126.     }
  127.     
  128.     public function setEmail(?string $email)
  129.     {
  130.         $this->email $email;
  131.         
  132.         return $this;
  133.     }
  134.     
  135.     public function getEmail()
  136.     {
  137.         return $this->email;
  138.     }
  139.     public function getCreatedDate(): ?\DateTimeInterface
  140.     {
  141.         return $this->createdDate;
  142.     }   
  143.     public function getUpdatedDate(): ?\DateTimeInterface
  144.     {
  145.         return $this->updatedDate;
  146.     }    
  147.     public function getStatus(): ?bool
  148.     {
  149.         return $this->status;
  150.     }
  151.     public function setStatus(bool $status): self
  152.     {
  153.         $this->status $status;
  154.         return $this;
  155.     }
  156.     public function getDocument(): ?Document
  157.     {
  158.         return $this->document;
  159.     }
  160.     public function setDocument(?Document $document): self
  161.     {
  162.         $this->document $document;
  163.         return $this;
  164.     }
  165. }