testitest

This commit is contained in:
lubiana 2025-06-08 21:22:26 +02:00
parent 43ca79f650
commit 66c4c1fe4f
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
30 changed files with 4443 additions and 184 deletions

View file

@ -21,11 +21,16 @@ class Order
private null|int $id = null;
#[ORM\Column(type: 'datetime_immutable')]
private readonly DateTimeImmutable $createdAt;
private DateTimeImmutable $createdAt;
#[ORM\Column(type: 'datetime_immutable')]
private DateTimeImmutable $updatedAt;
public function setUpdatedAt(DateTimeImmutable $updatedAt): void
{
$this->updatedAt = $updatedAt;
}
#[ORM\OneToMany(mappedBy: 'order', targetEntity: OrderItem::class, cascade: ['persist', 'remove'])]
private Collection $orderItems;
@ -96,6 +101,7 @@ class Order
return $this;
}
private function updateTimestamp(): void
{
$this->updatedAt = new DateTimeImmutable();