collection-crud/src/Entity/PurchasePriceTrait.php

35 lines
462 B
PHP
Raw Normal View History

2017-11-30 15:06:13 -05:00
<?php
namespace CameraBundle\Entity;
trait PurchasePriceTrait
{
/**
* Set purchasePrice
*
* @param string $purchasePrice
*
* @return self
2017-11-30 15:06:13 -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;
}
}