moved shared entity fields and functions to trait (#750)

This commit is contained in:
Kevin Papst
2019-05-02 18:03:40 +02:00
committed by GitHub
parent e80973c4d2
commit 455d772095
7 changed files with 89 additions and 217 deletions

View File

@@ -66,21 +66,8 @@ class Activity
*/
private $timesheets;
/**
* @var float
*
* @ORM\Column(name="fixed_rate", type="float", precision=10, scale=2, nullable=true)
* @Assert\GreaterThanOrEqual(0)
*/
private $fixedRate = null;
/**
* @var float
*
* @ORM\Column(name="hourly_rate", type="float", precision=10, scale=2, nullable=true)
* @Assert\GreaterThanOrEqual(0)
*/
private $hourlyRate = null;
// keep the trait include exactly here, for placing the column at the correct position
use RatesTrait;
/**
* @return int
@@ -174,44 +161,6 @@ class Activity
return $this->visible;
}
/**
* @return float
*/
public function getFixedRate(): ?float
{
return $this->fixedRate;
}
/**
* @param float $fixedRate
* @return Activity
*/
public function setFixedRate(?float $fixedRate)
{
$this->fixedRate = $fixedRate;
return $this;
}
/**
* @return float
*/
public function getHourlyRate(): ?float
{
return $this->hourlyRate;
}
/**
* @param float $hourlyRate
* @return Activity
*/
public function setHourlyRate(?float $hourlyRate)
{
$this->hourlyRate = $hourlyRate;
return $this;
}
/**
* @return string
*/