use traits to handle createdAt/updatedAt and by on AccompanyingCourseEvaluationDocument

This commit is contained in:
2022-04-29 16:41:24 +02:00
parent fcbf62f613
commit ad96319d97
3 changed files with 12 additions and 90 deletions

View File

@@ -16,17 +16,20 @@ use DateTime;
use DateTimeImmutable;
use DateTimeInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
trait TrackCreationTrait
{
/**
* @ORM\Column(type="datetime_immutable", nullable=true, options={"default": NULL})
* @Serializer\Groups({"read"})
*/
private ?DateTimeImmutable $createdAt = null;
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @ORM\JoinColumn(nullable=true)
* @Serializer\Groups({"read"})
*/
private ?User $createdBy = null;