src/AdminBundle/Entity/CarTypeAreaPrice.php line 11

Open in your IDE?
  1. <?php
  2. namespace AdminBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * CarTypeAreaPrice
  6. */
  7. #[ORM\Table(name: 'car_type_area_price')]
  8. #[ORM\Entity(repositoryClass: \AdminBundle\Repository\CarTypeAreaPriceRepository::class)]
  9. class CarTypeAreaPrice 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\CarType
  20. */
  21. #[ORM\JoinColumn(name: 'car_type', referencedColumnName: 'id')]
  22. #[ORM\ManyToOne(targetEntity: \AdminBundle\Entity\CarType::class)]
  23. protected $carType;
  24. /**
  25. * @var \AdminBundle\Entity\Area
  26. */
  27. #[ORM\JoinColumn(name: 'area', referencedColumnName: 'id')]
  28. #[ORM\ManyToOne(targetEntity: \AdminBundle\Entity\Area::class)]
  29. protected $area;
  30. /**
  31. * @var \AdminBundle\Entity\PriceThreshold
  32. */
  33. #[ORM\JoinColumn(name: 'price_threshold', referencedColumnName: 'id')]
  34. #[ORM\ManyToOne(targetEntity: \AdminBundle\Entity\PriceThreshold::class)]
  35. protected $priceThreshold;
  36. /**
  37. * @var float
  38. */
  39. #[ORM\Column(name: 'value', type: 'float')]
  40. protected $value;
  41. /**
  42. * @return int
  43. */
  44. public function getId()
  45. {
  46. return $this->id;
  47. }
  48. /**
  49. * @param int $id
  50. */
  51. public function setId($id)
  52. {
  53. $this->id = $id;
  54. }
  55. /**
  56. * @return CarType
  57. */
  58. public function getCarType()
  59. {
  60. return $this->carType;
  61. }
  62. /**
  63. * @param CarType $carType
  64. */
  65. public function setCarType($carType)
  66. {
  67. $this->carType = $carType;
  68. }
  69. /**
  70. * @return PriceThreshold
  71. */
  72. public function getPriceThreshold()
  73. {
  74. return $this->priceThreshold;
  75. }
  76. /**
  77. * @param PriceThreshold $priceThreshold
  78. */
  79. public function setPriceThreshold($priceThreshold)
  80. {
  81. $this->priceThreshold = $priceThreshold;
  82. }
  83. /**
  84. * @return float
  85. */
  86. public function getValue()
  87. {
  88. return $this->value;
  89. }
  90. /**
  91. * @return Area
  92. */
  93. public function getArea()
  94. {
  95. return $this->area;
  96. }
  97. /**
  98. * @param Area $area
  99. */
  100. public function setArea($area)
  101. {
  102. $this->area = $area;
  103. }
  104. /**
  105. * @param float $value
  106. */
  107. public function setValue($value)
  108. {
  109. $this->value = $value;
  110. }
  111. public function __toString()
  112. {
  113. return $this->getId() ? (string) $this->getId() : 'n\a';
  114. }
  115. }