2017-11-30 15:06:13 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace CameraBundle\Entity;
|
|
|
|
|
|
|
|
trait PurchasePriceTrait
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Set purchasePrice
|
|
|
|
*
|
|
|
|
* @param string $purchasePrice
|
|
|
|
*
|
2018-01-03 16:41:56 -05:00
|
|
|
* @return self
|
2017-11-30 15:06:13 -05:00
|
|
|
*/
|
2018-01-03 16:41:56 -05:00
|
|
|
public function setPurchasePrice($purchasePrice): self
|
2017-11-30 15:06:13 -05:00
|
|
|
{
|
|
|
|
$this->purchasePrice = $purchasePrice;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get purchasePrice
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getPurchasePrice()
|
|
|
|
{
|
|
|
|
if (empty($this->purchasePrice)) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return $this->purchasePrice;
|
|
|
|
}
|
|
|
|
}
|