<?php
namespace App\Entity;
use App\Repository\CBRCPageContentUpdateRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CBRCPageContentUpdateRepository::class)
*/
class CBRCPageContentUpdate
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=CBRCUser::class, inversedBy="pagecontentupdates")
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity=CBRCPageContent::class, inversedBy="pagecontentupdates")
* @ORM\JoinColumn(nullable=false)
*/
private $page;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $content;
/**
* @ORM\Column(type="datetime")
*/
private $date;
public function __construct()
{
$this->date= new \DateTime('now');
}
public function getId(): ?int
{
return $this->id;
}
public function getUser(): ?CBRCUser
{
return $this->user;
}
public function setUser(?CBRCUser $user): self
{
$this->user = $user;
return $this;
}
public function getPage(): ?CBRCPageContent
{
return $this->page;
}
public function setPage(?CBRCPageContent $page): self
{
$this->page = $page;
return $this;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(?string $content): self
{
$this->content = $content;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
}