add hourly_rate and fixed_rate to timesheet entries (#302)

This commit is contained in:
Kevin Papst
2018-09-05 15:27:39 +02:00
committed by GitHub
parent a636faa4ab
commit 6163f33abf
15 changed files with 219 additions and 9 deletions

View File

@@ -89,9 +89,26 @@ class Timesheet
* @var float
*
* @ORM\Column(name="rate", type="decimal", precision=10, scale=2, nullable=false)
* @Assert\GreaterThanOrEqual(0)
*/
private $rate = 0.00;
/**
* @var float
*
* @ORM\Column(name="fixed_rate", type="decimal", precision=10, scale=2, nullable=true)
* @Assert\GreaterThanOrEqual(0)
*/
private $fixedRate = null;
/**
* @var float
*
* @ORM\Column(name="hourly_rate", type="decimal", precision=10, scale=2, nullable=true)
* @Assert\GreaterThanOrEqual(0)
*/
private $hourlyRate = null;
/**
* Get entry id
*
@@ -259,6 +276,42 @@ class Timesheet
return $this->rate;
}
/**
* @return float
*/
public function getFixedRate(): ?float
{
return $this->fixedRate;
}
/**
* @param float $fixedRate
* @return Timesheet
*/
public function setFixedRate(?float $fixedRate)
{
$this->fixedRate = $fixedRate;
return $this;
}
/**
* @return float
*/
public function getHourlyRate(): ?float
{
return $this->hourlyRate;
}
/**
* @param float $hourlyRate
* @return Timesheet
*/
public function setHourlyRate(?float $hourlyRate)
{
$this->hourlyRate = $hourlyRate;
return $this;
}
/**
* @param ExecutionContextInterface $context
* @param mixed $payload