added internal rates (#1591)
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
namespace App\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Swagger\Annotations as SWG;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
trait Rate
|
||||
@@ -27,6 +28,7 @@ trait Rate
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="App\Entity\User")
|
||||
* @ORM\JoinColumn(onDelete="CASCADE", nullable=true)
|
||||
* @SWG\Property(ref="#/definitions/User")
|
||||
*/
|
||||
private $user;
|
||||
/**
|
||||
@@ -36,6 +38,12 @@ trait Rate
|
||||
* @Assert\GreaterThanOrEqual(0)
|
||||
*/
|
||||
private $rate = 0.00;
|
||||
/**
|
||||
* @var float|null
|
||||
*
|
||||
* @ORM\Column(name="internal_rate", type="float", nullable=true)
|
||||
*/
|
||||
private $internalRate;
|
||||
/**
|
||||
* @var bool
|
||||
*
|
||||
@@ -78,6 +86,18 @@ trait Rate
|
||||
return $this->rate;
|
||||
}
|
||||
|
||||
public function setInternalRate(?float $rate): self
|
||||
{
|
||||
$this->internalRate = $rate;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getInternalRate(): ?float
|
||||
{
|
||||
return $this->internalRate;
|
||||
}
|
||||
|
||||
public function isFixed(): bool
|
||||
{
|
||||
return $this->isFixed;
|
||||
|
||||
Reference in New Issue
Block a user