remove core from app
This commit is contained in:
parent
079e52eb42
commit
310689eae5
|
@ -1,57 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Doctrine;
|
|
||||||
|
|
||||||
trait Timestampable
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @ORM\Column(name="created_at", type="datetime")
|
|
||||||
*/
|
|
||||||
protected $createdAt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ORM\Column(name="updated_at", type="datetime")
|
|
||||||
*/
|
|
||||||
protected $updatedAt;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ORM\PrePersist
|
|
||||||
*/
|
|
||||||
public function onPrePersist(): void
|
|
||||||
{
|
|
||||||
$this->createdAt = new \DateTime();
|
|
||||||
$this->updatedAt = new \DateTime();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ORM\PreUpdate
|
|
||||||
*/
|
|
||||||
public function onPreUpdate(): void
|
|
||||||
{
|
|
||||||
$this->updatedAt = new \DateTime();
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getUpdatedAt(): ?\DateTime
|
|
||||||
{
|
|
||||||
return $this->updatedAt;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue