Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

TicketModel.php 1.8KB

3 år sedan
3 år sedan
3 år sedan
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 FilterMerchantInterface
  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. }