<?phpnamespace App\Entity;use App\Repository\NotificationRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=NotificationRepository::class) */class Notification{ const PERSON_CREATE = 'person_create'; const PERSON_UPDATE = 'person_update'; const PERSON_REMOVE = 'person_remove'; const HELP_PROGRAM_CREATE = 'help_program_create'; const HELP_PROGRAM_UPDATE = 'help_program_update'; const HELP_PROGRAM_REMOVE = 'help_program_remove'; const SUBURB_CREATE = 'suburb_create'; const SUBURB_UPDATE = 'suburb_update'; const SUBURB_REMOVE = 'suburb_remove'; const SECTION_CREATE = 'section_create'; const SECTION_UPDATE = 'section_update'; const SECTION_REMOVE = 'section_remove'; const EXTERNAL_DB_CREATE = 'external_db_create'; const EXTERNAL_DB_UPDATE = 'external_db_update'; const EXTERNAL_DB_REMOVE = 'external_db_remove'; const USER_CREATE = 'user_create'; const USER_UPDATE = 'user_update'; const USER_REMOVE = 'user_remove'; /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=User::class) * @ORM\JoinColumn(nullable=false) */ private $generatedBy; /** * @ORM\Column(type="datetime_immutable") */ private $generatedAt; /** * @ORM\ManyToOne(targetEntity=User::class) * @ORM\JoinColumn(nullable=false) */ private $generatedFor; /** * @ORM\Column(type="boolean") */ private $wellRead; /** * @ORM\Column(type="datetime_immutable", nullable=true) */ private $readAt; /** * @ORM\Column(type="string", length=255) */ private $type; /** * @ORM\Column(type="text") */ private $extraInfo; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $reference; /** * Notification constructor. */ public function __construct() { $this->wellRead = false; } public function getId(): ?int { return $this->id; } public function getGeneratedBy(): ?User { return $this->generatedBy; } public function setGeneratedBy(?User $generatedBy): self { $this->generatedBy = $generatedBy; return $this; } public function getGeneratedAt(): ?\DateTimeImmutable { return $this->generatedAt; } public function setGeneratedAt(\DateTimeImmutable $generatedAt): self { $this->generatedAt = $generatedAt; return $this; } public function getGeneratedFor(): ?User { return $this->generatedFor; } public function setGeneratedFor(?User $generatedFor): self { $this->generatedFor = $generatedFor; return $this; } public function isWellRead(): ?bool { return $this->wellRead; } public function setWellRead(bool $wellRead): self { $this->wellRead = $wellRead; return $this; } public function getReadAt(): ?\DateTimeImmutable { return $this->readAt; } public function setReadAt(?\DateTimeImmutable $readAt): self { $this->readAt = $readAt; return $this; } public function getType(): ?string { return $this->type; } public function setType(string $type): self { $this->type = $type; return $this; } public function getExtraInfo(): ?string { return $this->extraInfo; } public function setExtraInfo(string $extraInfo): self { $this->extraInfo = $extraInfo; return $this; } public function getReference(): ?string { return $this->reference; } public function setReference(string $reference): self { $this->reference = $reference; return $this; }}