From 15b7473af7318c49c2314fa1b8ec91425d780efc Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Mon, 21 Jan 2019 02:08:49 +0800 Subject: [PATCH] Add sap battery field to warranty entity #172 --- src/Entity/Warranty.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/Entity/Warranty.php b/src/Entity/Warranty.php index ca565aa4..6b759ac3 100644 --- a/src/Entity/Warranty.php +++ b/src/Entity/Warranty.php @@ -59,6 +59,13 @@ class Warranty */ protected $bty_size; + // sap battery + /** + * @ORM\ManyToOne(targetEntity="SAPBattery", inversedBy="warranties") + * @ORM\JoinColumn(name="sap_bty_id", referencedColumnName="id", nullable=true) + */ + protected $sap_bty; + // status /** * @ORM\Column(type="string", length=25) @@ -202,6 +209,17 @@ class Warranty return $this->bty_size; } + public function setSAPBattery(SAPBattery $sap_bty) + { + $this->sap_bty = $sap_bty; + return $this; + } + + public function getSAPBattery() + { + return $this->sap_bty; + } + public function setStatus($status) { $this->status = $status;