src/Entity/Gauge/GaugePhaseAndBreaker.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\PhaseAndBreakerRepository;
  8. /**
  9. * @ORM\Entity(repositoryClass=PhaseAndBreakerRepository::class)
  10. * @ORM\Table(name="gauge_phaze_and_breaker")
  11. */
  12. class GaugePhaseAndBreaker 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="phaseAndBreaker")
  24. * @ORM\JoinColumn(name="gauge_id", referencedColumnName="id", nullable=false)
  25. */
  26. private Gauge $gauge;
  27. /**
  28. * @ORM\Column(type="smallint")
  29. */
  30. private int $phase;
  31. /**
  32. * @ORM\Column(type="smallint")
  33. */
  34. private int $breaker;
  35. /**
  36. * @return int
  37. */
  38. public function getId(): int
  39. {
  40. return $this->id;
  41. }
  42. /**
  43. * @param int $id
  44. * @return GaugePhaseAndBreaker
  45. */
  46. public function setId(int $id): GaugePhaseAndBreaker
  47. {
  48. $this->id = $id;
  49. return $this;
  50. }
  51. /**
  52. * @return Gauge
  53. */
  54. public function getGauge(): Gauge
  55. {
  56. return $this->gauge;
  57. }
  58. /**
  59. * @param Gauge $gauge
  60. * @return GaugePhaseAndBreaker
  61. */
  62. public function setGauge(Gauge $gauge): GaugePhaseAndBreaker
  63. {
  64. $this->gauge = $gauge;
  65. return $this;
  66. }
  67. /**
  68. * @return int
  69. */
  70. public function getPhase(): int
  71. {
  72. return $this->phase;
  73. }
  74. /**
  75. * @param int $phase
  76. * @return GaugePhaseAndBreaker
  77. */
  78. public function setPhase(int $phase): GaugePhaseAndBreaker
  79. {
  80. $this->phase = $phase;
  81. return $this;
  82. }
  83. /**
  84. * @return int
  85. */
  86. public function getBreaker(): int
  87. {
  88. return $this->breaker;
  89. }
  90. /**
  91. * @param int $breaker
  92. * @return GaugePhaseAndBreaker
  93. */
  94. public function setBreaker(int $breaker): GaugePhaseAndBreaker
  95. {
  96. $this->breaker = $breaker;
  97. return $this;
  98. }
  99. }