for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
namespace Simplex\Quickstart\Shared\Doctrine;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use JMS\Serializer\Annotation as Serializer;
trait TimestampableEntity
{
/**
* @var \DateTime
*
* @Gedmo\Timestampable(on="create")
* @ORM\Column(type="datetime")
* @Serializer\Exclude()
*/
protected $createdAt;
* @Gedmo\Timestampable(on="update")
protected $updatedAt;
public function setCreatedAt(\DateTime $createdAt): self
$this->createdAt = $createdAt;
return $this;
}
public function getCreatedAt(): \DateTime
return $this->createdAt;
public function setUpdatedAt(\DateTime $updatedAt): self
$this->updatedAt = $updatedAt;
public function getUpdatedAt(): \DateTime
return $this->updatedAt;