74 linhas
1.7KB

  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Lc\ShopBundle\Context\ReductionInterface;
  5. /**
  6. * @ORM\MappedSuperclass()
  7. */
  8. abstract class OrderReductionCredit implements ReductionInterface
  9. {
  10. use ReductionTrait ;
  11. /**
  12. * @ORM\Column(type="string", length=255)
  13. */
  14. protected $title;
  15. /**
  16. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\OrderShopInterface", inversedBy="orderReductionCredits")
  17. * @ORM\JoinColumn(nullable=false)
  18. */
  19. protected $orderShop;
  20. /**
  21. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\ReductionCreditInterface")
  22. * @ORM\JoinColumn(nullable=false)
  23. */
  24. protected $reductionCredit;
  25. public function __toString()
  26. {
  27. return $this->title;
  28. }
  29. public function getTitle(): ?string
  30. {
  31. return $this->title;
  32. }
  33. public function setTitle(string $title): self
  34. {
  35. $this->title = $title;
  36. return $this;
  37. }
  38. public function getOrderShop(): ?OrderShop
  39. {
  40. return $this->orderShop;
  41. }
  42. public function setOrderShop(?OrderShop $orderShop): self
  43. {
  44. $this->orderShop = $orderShop;
  45. return $this;
  46. }
  47. public function getReductionCredit(): ?ReductionCredit
  48. {
  49. return $this->reductionCredit;
  50. }
  51. public function setReductionCredit(?ReductionCredit $reductionCredit): self
  52. {
  53. $this->reductionCredit = $reductionCredit;
  54. return $this;
  55. }
  56. }