for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Traits;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Expose;
/**
* @ExclusionPolicy("all")
*/
trait TimestampableTrait
{
* @Gedmo\Timestampable(on="create")
* @ORM\Column(type="datetime", name="createdAt")
* @Expose
protected $createdAt;
* @Gedmo\Timestampable(on="update")
* @ORM\Column(type="datetime", nullable=true, name="updatedAt")
protected $updatedAt;
* @ORM\Column(type="datetime", nullable=true, name="deletedAt")
protected $deletedAt;
* Get createdAt
*
* @return \DateTime Created at
public function getCreatedAt()
return $this->createdAt;
}
* Set createdAt
* @param \DateTime $createdAt Created at
* @return $this
public function setCreatedAt(\DateTime $createdAt)
$this->createdAt = $createdAt;
return $this;
* Get updatedAt
* @return \DateTime Updated at
public function getUpdatedAt()
return $this->updatedAt;
* Set updated At
* @param \DateTime $updatedAt Updated at
public function setUpdatedAt(\DateTime $updatedAt)
$this->updatedAt = $updatedAt;
* Get deletedAt
* @return \DateTime Deleted at
public function getDeletedAt()
return $this->deletedAt;
* Set deletedAt
* @param \DateTime $deletedAt Deleted at
public function setDeletedAt(\DateTime $deletedAt)
$this->deletedAt = $deletedAt;