src/AdminBundle/Entity/Zone.php line 12

Open in your IDE?
  1. <?php
  2. namespace AdminBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * Zone
  6. */
  7. #[ORM\Table(name: 'ctlf_zone')]
  8. #[ORM\Entity(repositoryClass: \AdminBundle\Repository\ZoneRepository::class)]
  9. class Zone extends BaseEntity
  10. {
  11. /**
  12. * @var integer
  13. */
  14. #[ORM\Column(name: 'id', type: 'integer', nullable: false)]
  15. #[ORM\Id]
  16. #[ORM\GeneratedValue(strategy: 'IDENTITY')]
  17. protected $id;
  18. /**
  19. * @var \AdminBundle\Entity\Area
  20. */
  21. #[ORM\JoinColumn(name: 'zone_start_area', referencedColumnName: 'id')]
  22. #[ORM\ManyToOne(targetEntity: \AdminBundle\Entity\Area::class)]
  23. protected $zoneStartArea;
  24. /**
  25. * @var \AdminBundle\Entity\Area
  26. */
  27. #[ORM\JoinColumn(name: 'zone_end_area', referencedColumnName: 'id')]
  28. #[ORM\ManyToOne(targetEntity: \AdminBundle\Entity\Area::class)]
  29. protected $zoneEndArea;
  30. /**
  31. * @var boolean
  32. */
  33. #[ORM\Column(name: 'zone_apply_reverse', type: 'boolean')]
  34. protected $zoneApplyReverse;
  35. /**
  36. * @return int
  37. */
  38. public function getId()
  39. {
  40. return $this->id;
  41. }
  42. /**
  43. * @param int $id
  44. */
  45. public function setId($id)
  46. {
  47. $this->id = $id;
  48. }
  49. /**
  50. * @return Area
  51. */
  52. public function getZoneStartArea()
  53. {
  54. return $this->zoneStartArea;
  55. }
  56. /**
  57. * @param Area $zoneStartArea
  58. */
  59. public function setZoneStartArea($zoneStartArea)
  60. {
  61. $this->zoneStartArea = $zoneStartArea;
  62. }
  63. /**
  64. * @return Area
  65. */
  66. public function getZoneEndArea()
  67. {
  68. return $this->zoneEndArea;
  69. }
  70. /**
  71. * @param Area $zoneEndArea
  72. */
  73. public function setZoneEndArea($zoneEndArea)
  74. {
  75. $this->zoneEndArea = $zoneEndArea;
  76. }
  77. /**
  78. * @return boolean
  79. */
  80. public function isZoneApplyReverse()
  81. {
  82. return $this->zoneApplyReverse;
  83. }
  84. /**
  85. * @param boolean $zoneApplyReverse
  86. */
  87. public function setZoneApplyReverse($zoneApplyReverse)
  88. {
  89. $this->zoneApplyReverse = $zoneApplyReverse;
  90. }
  91. public function getZoneName() {
  92. return $this->zoneStartArea->getAreaName().'-'.$this->zoneEndArea->getAreaName();
  93. }
  94. }