CreateCompareItemInput.php 746 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace Webkul\BagistoApi\Dto;
  3. use ApiPlatform\Metadata\ApiProperty;
  4. use Symfony\Component\Serializer\Annotation\Groups;
  5. /**
  6. * DTO for creating a compare item
  7. *
  8. * Defines the input structure for the createCompareItem mutation
  9. * Customer ID is automatically determined from the authenticated user
  10. */
  11. class CreateCompareItemInput
  12. {
  13. /**
  14. * Product ID to add to comparison
  15. */
  16. #[ApiProperty(description: 'The ID of the product to add to comparison')]
  17. #[Groups(['mutation'])]
  18. public ?int $product_id = null;
  19. public function getProduct_id(): ?int
  20. {
  21. return $this->product_id;
  22. }
  23. public function setProduct_id(?int $product_id): void
  24. {
  25. $this->product_id = $product_id;
  26. }
  27. }