src/Entity/Notification.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\NotificationRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=NotificationRepository::class)
  7.  */
  8. class Notification
  9. {
  10.     const PERSON_CREATE 'person_create';
  11.     const PERSON_UPDATE 'person_update';
  12.     const PERSON_REMOVE 'person_remove';
  13.     const HELP_PROGRAM_CREATE 'help_program_create';
  14.     const HELP_PROGRAM_UPDATE 'help_program_update';
  15.     const HELP_PROGRAM_REMOVE 'help_program_remove';
  16.     const SUBURB_CREATE 'suburb_create';
  17.     const SUBURB_UPDATE 'suburb_update';
  18.     const SUBURB_REMOVE 'suburb_remove';
  19.     const SECTION_CREATE 'section_create';
  20.     const SECTION_UPDATE 'section_update';
  21.     const SECTION_REMOVE 'section_remove';
  22.     const EXTERNAL_DB_CREATE 'external_db_create';
  23.     const EXTERNAL_DB_UPDATE 'external_db_update';
  24.     const EXTERNAL_DB_REMOVE 'external_db_remove';
  25.     const USER_CREATE 'user_create';
  26.     const USER_UPDATE 'user_update';
  27.     const USER_REMOVE 'user_remove';
  28.     /**
  29.      * @ORM\Id
  30.      * @ORM\GeneratedValue
  31.      * @ORM\Column(type="integer")
  32.      */
  33.     private $id;
  34.     /**
  35.      * @ORM\ManyToOne(targetEntity=User::class)
  36.      * @ORM\JoinColumn(nullable=false)
  37.      */
  38.     private $generatedBy;
  39.     /**
  40.      * @ORM\Column(type="datetime_immutable")
  41.      */
  42.     private $generatedAt;
  43.     /**
  44.      * @ORM\ManyToOne(targetEntity=User::class)
  45.      * @ORM\JoinColumn(nullable=false)
  46.      */
  47.     private $generatedFor;
  48.     /**
  49.      * @ORM\Column(type="boolean")
  50.      */
  51.     private $wellRead;
  52.     /**
  53.      * @ORM\Column(type="datetime_immutable", nullable=true)
  54.      */
  55.     private $readAt;
  56.     /**
  57.      * @ORM\Column(type="string", length=255)
  58.      */
  59.     private $type;
  60.     /**
  61.      * @ORM\Column(type="text")
  62.      */
  63.     private $extraInfo;
  64.     /**
  65.      * @ORM\Column(type="string", length=255, nullable=true)
  66.      */
  67.     private $reference;
  68.     /**
  69.      * Notification constructor.
  70.      */
  71.     public function __construct()
  72.     {
  73.         $this->wellRead false;
  74.     }
  75.     public function getId(): ?int
  76.     {
  77.         return $this->id;
  78.     }
  79.     public function getGeneratedBy(): ?User
  80.     {
  81.         return $this->generatedBy;
  82.     }
  83.     public function setGeneratedBy(?User $generatedBy): self
  84.     {
  85.         $this->generatedBy $generatedBy;
  86.         return $this;
  87.     }
  88.     public function getGeneratedAt(): ?\DateTimeImmutable
  89.     {
  90.         return $this->generatedAt;
  91.     }
  92.     public function setGeneratedAt(\DateTimeImmutable $generatedAt): self
  93.     {
  94.         $this->generatedAt $generatedAt;
  95.         return $this;
  96.     }
  97.     public function getGeneratedFor(): ?User
  98.     {
  99.         return $this->generatedFor;
  100.     }
  101.     public function setGeneratedFor(?User $generatedFor): self
  102.     {
  103.         $this->generatedFor $generatedFor;
  104.         return $this;
  105.     }
  106.     public function isWellRead(): ?bool
  107.     {
  108.         return $this->wellRead;
  109.     }
  110.     public function setWellRead(bool $wellRead): self
  111.     {
  112.         $this->wellRead $wellRead;
  113.         return $this;
  114.     }
  115.     public function getReadAt(): ?\DateTimeImmutable
  116.     {
  117.         return $this->readAt;
  118.     }
  119.     public function setReadAt(?\DateTimeImmutable $readAt): self
  120.     {
  121.         $this->readAt $readAt;
  122.         return $this;
  123.     }
  124.     public function getType(): ?string
  125.     {
  126.         return $this->type;
  127.     }
  128.     public function setType(string $type): self
  129.     {
  130.         $this->type $type;
  131.         return $this;
  132.     }
  133.     public function getExtraInfo(): ?string
  134.     {
  135.         return $this->extraInfo;
  136.     }
  137.     public function setExtraInfo(string $extraInfo): self
  138.     {
  139.         $this->extraInfo $extraInfo;
  140.         return $this;
  141.     }
  142.     public function getReference(): ?string
  143.     {
  144.         return $this->reference;
  145.     }
  146.     public function setReference(string $reference): self
  147.     {
  148.         $this->reference $reference;
  149.         return $this;
  150.     }
  151. }