Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

TicketModel.php 1.4KB

3 lat temu
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace Lc\CaracoleBundle\Model\Ticket;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface;
  5. use Lc\CaracoleBundle\Doctrine\Extension\FilterSectionInterface;
  6. use Lc\CaracoleBundle\Model\Order\OrderShopInterface;
  7. use Lc\CaracoleBundle\Model\Section\SectionInterface;
  8. use Lc\SovBundle\Model\Ticket\TicketModel as SovTicketModel;
  9. /**
  10. * @ORM\MappedSuperclass()
  11. */
  12. abstract class TicketModel extends SovTicketModel implements FilterSectionInterface
  13. {
  14. const TYPE_PRODUCT_UNAVAILABLE = 'product-unavailable';
  15. const TYPE_PRODUCT_ERROR = 'product-error';
  16. /**
  17. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Section\SectionInterface", inversedBy="pages")
  18. * @ORM\JoinColumn(nullable=false)
  19. */
  20. protected $section;
  21. /**
  22. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Order\OrderShopInterface", inversedBy="tickets")
  23. */
  24. protected $orderShop;
  25. public function getSection(): SectionInterface
  26. {
  27. return $this->section;
  28. }
  29. public function setSection(SectionInterface $section): self
  30. {
  31. $this->section = $section;
  32. return $this;
  33. }
  34. public function getOrderShop(): ?OrderShopInterface
  35. {
  36. return $this->orderShop;
  37. }
  38. public function setOrderShop(OrderShopInterface $orderShop): self
  39. {
  40. $this->orderShop = $orderShop;
  41. return $this;
  42. }
  43. }