|
- <?php
-
- namespace Lc\ShopBundle\Model;
-
- use App\Entity\OrderPayment;
- use App\Entity\OrderRefund;
- use App\Entity\UserMerchant;
- use Doctrine\ORM\Mapping as ORM;
- use Lc\ShopBundle\Context\OrderPaymentInterface;
- use Lc\ShopBundle\Context\OrderRefundInterface;
- use Lc\ShopBundle\Context\UserMerchantInterface;
-
- /**
- * @ORM\MappedSuperclass()
- */
- abstract class CreditHistory extends AbstractEntity
- {
- /**
- * @ORM\Column(type="float")
- */
- protected $amount;
-
- /**
- * @ORM\Column(type="string", length=31)
- */
- protected $meanPayment;
-
- /**
- * @ORM\Column(type="text", nullable=true)
- */
- protected $comment;
-
- /**
- * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserMerchantInterface", inversedBy="creditHistories")
- * @ORM\JoinColumn(nullable=false)
- */
- protected $userMerchant;
-
- /**
- * @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\OrderPaymentInterface", cascade={"persist", "remove"})
- */
- protected $orderPayment;
-
- /**
- * @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\OrderRefundInterface", cascade={"persist", "remove"})
- */
- protected $orderRefund;
-
-
- public function getAmount(): ?float
- {
- return $this->amount;
- }
-
- public function setAmount(float $amount): self
- {
- $this->amount = $amount;
-
- return $this;
- }
-
- public function getMeanPayment(): ?string
- {
- return $this->meanPayment;
- }
-
- public function setMeanPayment(string $meanPayment): self
- {
- $this->meanPayment = $meanPayment;
-
- return $this;
- }
-
- public function getComment(): ?string
- {
- return $this->comment;
- }
-
- public function setComment(string $comment): self
- {
- $this->comment = $comment;
-
- return $this;
- }
-
- public function getUserMerchant(): ?UserMerchantInterface
- {
- return $this->userMerchant;
- }
-
- public function setUserMerchant(?UserMerchantInterface $userMerchant): self
- {
- $this->userMerchant = $userMerchant;
-
- return $this;
- }
-
- public function getOrderPayment(): ?OrderPaymentInterface
- {
- return $this->orderPayment;
- }
-
- public function setOrderPayment(?OrderPaymentInterface $orderPayment): self
- {
- $this->orderPayment = $orderPayment;
-
- return $this;
- }
-
- public function getOrderRefund(): ?OrderRefundInterface
- {
- return $this->orderRefund;
- }
-
- public function setOrderRefund(?OrderRefundInterface $orderRefund): self
- {
- $this->orderRefund = $orderRefund;
-
- return $this;
- }
- }
|