Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

76 lines
1.8KB

  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\Merchant\MerchantInterface;
  7. use Lc\CaracoleBundle\Model\Order\OrderShopInterface;
  8. use Lc\CaracoleBundle\Model\Section\SectionInterface;
  9. use Lc\SovBundle\Model\Ticket\TicketModel as SovTicketModel;
  10. /**
  11. * @ORM\MappedSuperclass()
  12. */
  13. abstract class TicketModel extends SovTicketModel implements FilterSectionInterface
  14. {
  15. const TYPE_PRODUCT_UNAVAILABLE = 'product-unavailable';
  16. const TYPE_PRODUCT_ERROR = 'product-error';
  17. /**
  18. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Section\SectionInterface")
  19. * @ORM\JoinColumn(nullable=true)
  20. */
  21. protected $section;
  22. /**
  23. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface")
  24. * @ORM\JoinColumn(nullable=false)
  25. */
  26. protected $merchant;
  27. /**
  28. * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Order\OrderShopInterface", inversedBy="tickets")
  29. */
  30. protected $orderShop;
  31. public function getSection(): ? SectionInterface
  32. {
  33. return $this->section;
  34. }
  35. public function setSection(? SectionInterface $section): self
  36. {
  37. $this->section = $section;
  38. return $this;
  39. }
  40. public function getMerchant(): MerchantInterface
  41. {
  42. return $this->merchant;
  43. }
  44. public function setMerchant( MerchantInterface $merchant): self
  45. {
  46. $this->merchant = $merchant;
  47. return $this;
  48. }
  49. public function getOrderShop(): ?OrderShopInterface
  50. {
  51. return $this->orderShop;
  52. }
  53. public function setOrderShop(OrderShopInterface $orderShop): self
  54. {
  55. $this->orderShop = $orderShop;
  56. return $this;
  57. }
  58. }