src/Entity/CBRCPageContentUpdate.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CBRCPageContentUpdateRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=CBRCPageContentUpdateRepository::class)
  7.  */
  8. class CBRCPageContentUpdate
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity=CBRCUser::class, inversedBy="pagecontentupdates")
  18.      */
  19.     private $user;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=CBRCPageContent::class, inversedBy="pagecontentupdates")
  22.      * @ORM\JoinColumn(nullable=false)
  23.      */
  24.     private $page;
  25.     /**
  26.      * @ORM\Column(type="text", nullable=true)
  27.      */
  28.     private $content;
  29.     /**
  30.      * @ORM\Column(type="datetime")
  31.      */
  32.     private $date;
  33.     public function __construct()
  34.     {
  35.         $this->date= new \DateTime('now');
  36.     }
  37.     public function getId(): ?int
  38.     {
  39.         return $this->id;
  40.     }
  41.     public function getUser(): ?CBRCUser
  42.     {
  43.         return $this->user;
  44.     }
  45.     public function setUser(?CBRCUser $user): self
  46.     {
  47.         $this->user $user;
  48.         return $this;
  49.     }
  50.     public function getPage(): ?CBRCPageContent
  51.     {
  52.         return $this->page;
  53.     }
  54.     public function setPage(?CBRCPageContent $page): self
  55.     {
  56.         $this->page $page;
  57.         return $this;
  58.     }
  59.     public function getContent(): ?string
  60.     {
  61.         return $this->content;
  62.     }
  63.     public function setContent(?string $content): self
  64.     {
  65.         $this->content $content;
  66.         return $this;
  67.     }
  68.     public function getDate(): ?\DateTimeInterface
  69.     {
  70.         return $this->date;
  71.     }
  72.     public function setDate(\DateTimeInterface $date): self
  73.     {
  74.         $this->date $date;
  75.         return $this;
  76.     }
  77. }