collection-crud/src/Entity/PurchasePriceTrait.php

35 lines
453 B
PHP

<?php
namespace App\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;
}
}