<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'push_notification')]
#[ORM\Entity(repositoryClass: 'App\Entity\Repository\PushNotificationRepository')]
class PushNotification
{
#[ORM\Id]
#[ORM\Column(type: 'integer')]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private $id;
#[ORM\Column(type: 'string', nullable: true)]
private $type;
#[ORM\Column(type: 'string', nullable: true)]
private $title;
#[ORM\Column(type: 'text', nullable: true)]
private $message;
#[ORM\Column(type: 'datetime', nullable: false)]
private $date_created;
#[ORM\ManyToOne(targetEntity: 'App\Entity\User', inversedBy: 'pushNotification')]
#[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', nullable: false)]
private $user;
public function getId(): ?int
{
return $this->id;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): self
{
$this->title = $title;
return $this;
}
public function getMessage(): ?string
{
return $this->message;
}
public function setMessage(?string $message): self
{
$this->message = $message;
return $this;
}
public function getDateCreated(): ?\DateTimeInterface
{
return $this->date_created;
}
public function setDateCreated(\DateTimeInterface $date_created): self
{
$this->date_created = $date_created;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
}