Procházet zdrojové kódy

Modèles CreditHistory / UserMerchant

feature/export_comptable
Guillaume před 4 roky
rodič
revize
c417ff0d9f
1 změnil soubory, kde provedl 43 přidání a 3 odebrání
  1. +43
    -3
      ShopBundle/Model/CreditHistory.php

+ 43
- 3
ShopBundle/Model/CreditHistory.php Zobrazit soubor

@@ -2,8 +2,13 @@

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()
@@ -26,11 +31,22 @@ abstract class CreditHistory extends AbstractEntity
protected $comment;

/**
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserLerchantInterface", inversedBy="creditHistories")
* @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;
@@ -67,15 +83,39 @@ abstract class CreditHistory extends AbstractEntity
return $this;
}

public function getUserMerchant(): ?UserMerchant
public function getUserMerchant(): ?UserMerchantInterface
{
return $this->userMerchant;
}

public function setUserMerchant(?UserMerchant $userMerchant): self
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;
}
}

Načítá se…
Zrušit
Uložit