collection-crud/src/Entity/PurchasePriceTrait.php

35 lines
462 B
PHP

<?php
namespace CameraBundle\Entity;
trait PurchasePriceTrait
{
/**
* Set purchasePrice
*
* @param string $purchasePrice
*
* @return self
*/
public function setPurchasePrice($purchasePrice): self
{
$this->purchasePrice = $purchasePrice;
return $this;
}
/**
* Get purchasePrice
*
* @return string
*/
public function getPurchasePrice()
{
if (empty($this->purchasePrice)) {
return 0;
}
return $this->purchasePrice;
}
}