src/Entity/PushNotification.php line 7

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Table(name'push_notification')]
  5. #[ORM\Entity(repositoryClass'App\Entity\Repository\PushNotificationRepository')]
  6. class PushNotification
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\Column(type'integer')]
  10.     #[ORM\GeneratedValue(strategy'AUTO')]
  11.     private $id;
  12.     #[ORM\Column(type'string'nullabletrue)]
  13.     private $type;
  14.     #[ORM\Column(type'string'nullabletrue)]
  15.     private $title;
  16.     #[ORM\Column(type'text'nullabletrue)]
  17.     private $message;
  18.     #[ORM\Column(type'datetime'nullablefalse)]
  19.     private $date_created;
  20.     #[ORM\ManyToOne(targetEntity'App\Entity\User'inversedBy'pushNotification')]
  21.     #[ORM\JoinColumn(name'user_id'referencedColumnName'id'nullablefalse)]
  22.     private $user;
  23.     public function getId(): ?int
  24.     {
  25.         return $this->id;
  26.     }
  27.     public function getType(): ?string
  28.     {
  29.         return $this->type;
  30.     }
  31.     public function setType(?string $type): self
  32.     {
  33.         $this->type $type;
  34.         return $this;
  35.     }
  36.     public function getTitle(): ?string
  37.     {
  38.         return $this->title;
  39.     }
  40.     public function setTitle(?string $title): self
  41.     {
  42.         $this->title $title;
  43.         return $this;
  44.     }
  45.     public function getMessage(): ?string
  46.     {
  47.         return $this->message;
  48.     }
  49.     public function setMessage(?string $message): self
  50.     {
  51.         $this->message $message;
  52.         return $this;
  53.     }
  54.     public function getDateCreated(): ?\DateTimeInterface
  55.     {
  56.         return $this->date_created;
  57.     }
  58.     public function setDateCreated(\DateTimeInterface $date_created): self
  59.     {
  60.         $this->date_created $date_created;
  61.         return $this;
  62.     }
  63.     public function getUser(): ?User
  64.     {
  65.         return $this->user;
  66.     }
  67.     public function setUser(?User $user): self
  68.     {
  69.         $this->user $user;
  70.         return $this;
  71.     }
  72. }