src/Entity/Comment.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CommentRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=CommentRepository::class)
  7.  */
  8. class Comment
  9. {
  10.     const RESOURCE_KEY 'comments';
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="text")
  19.      */
  20.     private $text;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="comments")
  23.      * @ORM\JoinColumn(nullable=false)
  24.      */
  25.     private $publisher;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity=Journal::class, inversedBy="comments")
  28.      * @ORM\JoinColumn(nullable=false)
  29.      */
  30.     private $journal;
  31.     /**
  32.      * @ORM\Column(type="datetime")
  33.      */
  34.     private $created_at;
  35.     /**
  36.      * @ORM\Column(type="datetime",nullable=true)
  37.      */
  38.     private $deleted_at;
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getText(): ?string
  44.     {
  45.         return $this->text;
  46.     }
  47.     public function setText(string $text): self
  48.     {
  49.         $this->text $text;
  50.         return $this;
  51.     }
  52.     public function getPublisher(): ?User
  53.     {
  54.         return $this->publisher;
  55.     }
  56.     public function setPublisher(?User $publisher): self
  57.     {
  58.         $this->publisher $publisher;
  59.         return $this;
  60.     }
  61.     public function getJournal(): ?Journal
  62.     {
  63.         return $this->journal;
  64.     }
  65.     public function setJournal(?Journal $journal): self
  66.     {
  67.         $this->journal $journal;
  68.         return $this;
  69.     }
  70.     public function getCreatedAt(): ?\DateTime
  71.     {
  72.         return $this->created_at;
  73.     }
  74.     public function setCreatedAt(\DateTime $created_at): self
  75.     {
  76.         $this->created_at $created_at;
  77.         return $this;
  78.     }
  79.     /**
  80.      * @return mixed
  81.      */
  82.     public function getDeletedAt(): ?\DateTime
  83.     {
  84.         return $this->deleted_at;
  85.     }
  86.     /**
  87.      * @param mixed $deleted_at
  88.      */
  89.     public function setDeletedAt(\DateTime $deleted_at): self
  90.     {
  91.         $this->deleted_at $deleted_at;
  92.         return $this;
  93.     }
  94. }