src/Entity/Gauge/GaugeHeatingPower.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gauge;
  3. use App\Entity\Extension\HistoricalInterface;
  4. use App\Entity\Extension\HistoricalTrait;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. use App\Repository\Gauge\GaugeHeatingPowerRepository;
  8. /**
  9. * @ORM\Entity(repositoryClass=GaugeHeatingPowerRepository::class)
  10. * @ORM\Table(name="gauge_heating_power")
  11. */
  12. class GaugeHeatingPower implements HistoricalInterface
  13. {
  14. use HistoricalTrait;
  15. /**
  16. * @ORM\Id()
  17. * @ORM\GeneratedValue()
  18. * @ORM\Column(type="integer")
  19. */
  20. private int $id;
  21. /**
  22. * @var Gauge $gauge
  23. * @ORM\ManyToOne(targetEntity="App\Entity\Gauge\Gauge", inversedBy="heatingPower")
  24. * @ORM\JoinColumn(name="gauge_id", referencedColumnName="id", nullable=false)
  25. */
  26. private Gauge $gauge;
  27. /**
  28. * @ORM\Column(type="float")
  29. */
  30. private float $heatingPower;
  31. /**
  32. * @return int
  33. */
  34. public function getId(): int
  35. {
  36. return $this->id;
  37. }
  38. /**
  39. * @param int $id
  40. * @return GaugeHeatingPower
  41. */
  42. public function setId(int $id): GaugeHeatingPower
  43. {
  44. $this->id = $id;
  45. return $this;
  46. }
  47. /**
  48. * @return Gauge
  49. */
  50. public function getGauge(): Gauge
  51. {
  52. return $this->gauge;
  53. }
  54. /**
  55. * @param Gauge $gauge
  56. * @return GaugeHeatingPower
  57. */
  58. public function setGauge(Gauge $gauge): GaugeHeatingPower
  59. {
  60. $this->gauge = $gauge;
  61. return $this;
  62. }
  63. /**
  64. * @return float
  65. */
  66. public function getHeatingPower(): float
  67. {
  68. return $this->heatingPower;
  69. }
  70. /**
  71. * @param float $heatingPower
  72. * @return GaugeHeatingPower
  73. */
  74. public function setHeatingPower(float $heatingPower): GaugeHeatingPower
  75. {
  76. $this->heatingPower = $heatingPower;
  77. return $this;
  78. }
  79. }