src/Entity/ModerationNotification.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ModerationNotificationRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassModerationNotificationRepository::class)]
  7. class ModerationNotification
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length50)]
  14.     private ?string $type null;
  15.     #[ORM\ManyToOne(inversedBy'moderationNotifications')]
  16.     private ?User $user null;
  17.     #[ORM\Column(nullabletrue)]
  18.     private array $payload = [];
  19.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  20.     private ?\DateTimeInterface $created_at null;
  21.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  22.     private ?\DateTimeInterface $updated_at null;
  23.     public function __construct() {
  24.         $this->created_at = new \DateTime();
  25.     }
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getType(): ?string
  31.     {
  32.         return $this->type;
  33.     }
  34.     public function setType(string $type): static
  35.     {
  36.         $this->type $type;
  37.         return $this;
  38.     }
  39.     public function getUser(): ?User
  40.     {
  41.         return $this->user;
  42.     }
  43.     public function setUser(?User $user): static
  44.     {
  45.         $this->user $user;
  46.         return $this;
  47.     }
  48.     public function getPayload(): array
  49.     {
  50.         return $this->payload;
  51.     }
  52.     public function setPayload(?array $payload): static
  53.     {
  54.         $this->payload $payload;
  55.         return $this;
  56.     }
  57.     public function getCreatedAt(): ?\DateTimeInterface
  58.     {
  59.         return $this->created_at;
  60.     }
  61.     public function setCreatedAt(\DateTimeInterface $created_at): static
  62.     {
  63.         $this->created_at $created_at;
  64.         return $this;
  65.     }
  66.     public function getUpdatedAt(): ?\DateTimeInterface
  67.     {
  68.         return $this->updated_at;
  69.     }
  70.     public function setUpdatedAt(?\DateTimeInterface $updated_at): static
  71.     {
  72.         $this->updated_at $updated_at;
  73.         return $this;
  74.     }
  75. }