issues/27: prod baseline without task branch
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Entity\Behavior;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* Требует у класса-сущности свойство `$updateAt` (mapped column).
|
||||
*
|
||||
* @property \DateTimeInterface|null $updateAt
|
||||
*/
|
||||
trait UpdateTimestampTrait
|
||||
{
|
||||
#[ORM\PrePersist]
|
||||
public function setInitialUpdateAt(): void
|
||||
{
|
||||
if ($this->updateAt === null) {
|
||||
$this->updateAt = new \DateTimeImmutable();
|
||||
}
|
||||
}
|
||||
|
||||
#[ORM\PreUpdate]
|
||||
public function refreshUpdateAt(): void
|
||||
{
|
||||
$this->updateAt = new \DateTimeImmutable();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user