|
- <?php
-
- namespace Lc\ShopBundle\Model;
-
- use Doctrine\ORM\Mapping as ORM;
- use Lc\ShopBundle\Context\OrderPaymentInterface;
- use Lc\ShopBundle\Context\ReductionInterface;
-
- /**
- * @ORM\MappedSuperclass()
- */
- trait OrderPayoffTrait
- {
-
- /**
- * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\OrderShopInterface", inversedBy="orderPayments")
- * @ORM\JoinColumn(nullable=false)
- */
- protected $orderShop;
-
- /**
- * @ORM\Column(type="string", length=255, nullable=true)
- */
- protected $meanPayment;
-
- /**
- * @ORM\Column(type="text", nullable=true)
- */
- protected $reference;
-
- /**
- * @ORM\Column(type="datetime", nullable=true)
- */
- protected $paidAt;
-
- /**
- * @ORM\Column(type="float")
- */
- protected $amount;
-
- /**
- * @ORM\Column(type="text", nullable=true)
- */
- protected $comment;
-
- /**
- * @ORM\Column(type="boolean")
- */
- protected $editable;
-
- public function __toString()
- {
- return $this->amount. '€ par '.$this->type.' le '.$this->getPaidAt()->format('d-m-Y');
- }
-
- public function getOrderShop(): ?OrderShop
- {
- return $this->orderShop;
- }
-
- public function setOrderShop(?OrderShop $orderShop): self
- {
- $this->orderShop = $orderShop;
-
- return $this;
- }
-
- public function setMeanPayment(?string $meanPayment): self
- {
- $this->meanPayment = $meanPayment;
-
- return $this;
- }
-
- public function getMeanPayment(?string $meanPayment): self
- {
- $this->meanPayment = $meanPayment;
-
- return $this;
- }
-
-
- public function getReference(): ?string
- {
- return $this->reference;
- }
-
- public function setReference(?string $reference): self
- {
- $this->reference = $reference;
-
- return $this;
- }
-
- public function getPaidAt(): ?\DateTimeInterface
- {
- return $this->paidAt;
- }
-
- public function setPaidAt(?\DateTimeInterface $paidAt): self
- {
- $this->paidAt = $paidAt;
-
- return $this;
- }
-
- public function getAmount(): ?float
- {
- return $this->amount;
- }
-
- public function setAmount(float $amount): self
- {
- $this->amount = $amount;
-
- return $this;
- }
-
- public function getComment(): ?string
- {
- return $this->comment;
- }
-
- public function setComment(?string $comment): self
- {
- $this->comment = $comment;
-
- return $this;
- }
-
- public function setEditable(bool $editable): self
- {
- $this->editable = $editable;
-
- return $this;
- }
-
- public function getEditable(): ?bool
- {
- return $this->editable;
- }
-
- public function isEditable(): ?bool
- {
- return $this->editable;
- }
- }
|