53 行
1.3KB

  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Lc\ShopBundle\Context\OrderPaymentInterface;
  5. use Lc\ShopBundle\Context\OrderPayoffInterface;
  6. use Lc\ShopBundle\Context\ReductionInterface;
  7. /**
  8. * @ORM\MappedSuperclass()
  9. */
  10. abstract class OrderRefund extends AbstractEntity implements OrderPayoffInterface
  11. {
  12. use OrderPayoffTrait;
  13. /**
  14. * @ORM\Column(type="float", nullable=true)
  15. */
  16. protected $deliveryRefundAmount;
  17. /**
  18. * @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\DocumentInterface", inversedBy="orderRefund", cascade={"persist", "remove"})
  19. * @ORM\JoinColumn(nullable=false)
  20. */
  21. protected $document;
  22. public function getDeliveryRefundAmount(): ?float
  23. {
  24. return $this->deliveryRefundAmount;
  25. }
  26. public function setDeliveryRefundAmount(?float $deliveryRefundAmount): self
  27. {
  28. $this->deliveryRefundAmount = $deliveryRefundAmount;
  29. return $this;
  30. }
  31. public function getDocument(): ?Document
  32. {
  33. return $this->document;
  34. }
  35. public function setDocument(Document $document): self
  36. {
  37. $this->document = $document;
  38. return $this;
  39. }
  40. }