add price feature
All checks were successful
/ ls (pull_request) Successful in 1m37s
/ ls (push) Successful in 1m37s

This commit is contained in:
lubiana 2025-06-29 23:18:23 +02:00
parent 15f8db46a0
commit 64f5341371
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
18 changed files with 484 additions and 157 deletions

View file

@ -11,6 +11,7 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\IdGenerator\UlidGenerator;
use Symfony\Bridge\Doctrine\Types\UlidType;
use Symfony\Component\Uid\Ulid;
use Symfony\Component\Validator\Constraints\Positive;
#[ApiResource]
#[ORM\Entity(repositoryClass: MenuItemRepository::class)]
@ -38,6 +39,7 @@ class MenuItem
#[ORM\Column(type: 'integer', options: [
'default' => 0,
])]
#[Positive]
private int $priceCents = 0;
public function __construct(

View file

@ -47,6 +47,7 @@ class OrderItem
#[ORM\Column(type: 'integer', options: [
'default' => 0,
])]
#[Positive]
private int $priceCents = 0;
public function __construct(