add price feature
This commit is contained in:
parent
15f8db46a0
commit
64f5341371
18 changed files with 484 additions and 157 deletions
|
@ -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(
|
||||
|
|
|
@ -47,6 +47,7 @@ class OrderItem
|
|||
#[ORM\Column(type: 'integer', options: [
|
||||
'default' => 0,
|
||||
])]
|
||||
#[Positive]
|
||||
private int $priceCents = 0;
|
||||
|
||||
public function __construct(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue