diff --git a/Entity/Order.php b/Entity/Order.php index 04dce56..e7ab5fc 100644 --- a/Entity/Order.php +++ b/Entity/Order.php @@ -55,9 +55,9 @@ class Order protected $status; /** - * @var string + * @var Transaction * - * @ORM\OneToOne(targetEntity="Troopers\MangopayBundle\Entity\Transaction", cascade={"remove"}) + * @ORM\OneToOne(targetEntity="Troopers\MangopayBundle\Entity\Transaction", cascade={"persist", "remove"}) */ protected $payinTransaction; @@ -113,7 +113,7 @@ public function getStatus() /** * Set payinTransaction. * - * @param int $payinTransaction + * @param Transaction $payinTransaction * * @return Order */ @@ -127,7 +127,7 @@ public function setPayinTransaction($payinTransaction) /** * Get payinTransaction. * - * @return int + * @return Transaction */ public function getPayinTransaction() { diff --git a/Entity/Transaction.php b/Entity/Transaction.php index 7e904b1..60b12de 100644 --- a/Entity/Transaction.php +++ b/Entity/Transaction.php @@ -24,6 +24,11 @@ class Transaction implements TransactionInterface */ protected $id; + /** + * @var int + */ + protected $mangoId; + /** * Author Id. * @@ -100,7 +105,7 @@ class Transaction implements TransactionInterface * Execution date;. * * @var \DateTime - * @ORM\Column(name="executionDate", type="datetime") + * @ORM\Column(name="executionDate", type="datetime", nullable=true) */ protected $executionDate; @@ -124,7 +129,7 @@ class Transaction implements TransactionInterface * CardType { CB_VISA_MASTERCARD, MAESTRO, DINERS, P24″, MASTERPASS }. * * @var string - * @ORM\Column(name="cardType", type="string", length=255) + * @ORM\Column(name="cardType", type="string", length=255, nullable=true) */ protected $cardType; @@ -138,6 +143,24 @@ protected function getId() return $this->id; } + /** + * @return int + */ + public function getMangoId() + { + return $this->mangoId; + } + + /** + * @param int $mangoId + * @return Transaction + */ + public function setMangoId($mangoId) + { + $this->mangoId = $mangoId; + return $this; + } + /** * Get authorId. *