<?php
declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\MappedSuperclass
* The most generic type of item.
*
* @see http://schema.org/Thing Documentation on Schema.org
*/
abstract class AbstractTimestamp
{
/**
* @ORM\Column(type="datetime", nullable=true)
* @Groups({"output"})
*
* @var \DateTimeInterface|null
*
*/
protected $createdAt;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User")
*
* @var User|null
*/
protected $createdBy;
/**
* @ORM\Column(type="datetime", nullable=true)
* @Groups({"output"})
*
* @var \DateTimeInterface|null
*
*/
protected $updatedAt;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User")
*
* @var User|null
*/
protected $updatedBy;
public function setCreatedAt(?\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedBy(?User $createdBy): self
{
$this->createdBy = $createdBy;
return $this;
}
public function getCreatedBy(): ?User
{
return $this->createdBy;
}
public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedBy(?User $updatedBy): self
{
$this->updatedBy = $updatedBy;
return $this;
}
public function getUpdatedBy(): ?User
{
return $this->updatedBy;
}
}