src/AdminBundle/Entity/CarTypePrice.php line 11

Open in your IDE?
  1. <?php
  2. namespace AdminBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * CarTypePrice
  6. */
  7. #[ORM\Table(name: 'car_type_price')]
  8. #[ORM\Entity(repositoryClass: \AdminBundle\Repository\CarTypePriceRepository::class)]
  9. class CarTypePrice 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\PriceThreshold
  26. */
  27. #[ORM\JoinColumn(name: 'price_threshold', referencedColumnName: 'id')]
  28. #[ORM\ManyToOne(targetEntity: \AdminBundle\Entity\PriceThreshold::class)]
  29. protected $priceThreshold;
  30. /**
  31. * @var float
  32. */
  33. #[ORM\Column(name: 'value', type: 'float')]
  34. protected $value;
  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 CarType
  51. */
  52. public function getCarType()
  53. {
  54. return $this->carType;
  55. }
  56. /**
  57. * @param CarType $carType
  58. */
  59. public function setCarType($carType)
  60. {
  61. $this->carType = $carType;
  62. }
  63. /**
  64. * @return PriceThreshold
  65. */
  66. public function getPriceThreshold()
  67. {
  68. return $this->priceThreshold;
  69. }
  70. /**
  71. * @param PriceThreshold $priceThreshold
  72. */
  73. public function setPriceThreshold($priceThreshold)
  74. {
  75. $this->priceThreshold = $priceThreshold;
  76. }
  77. /**
  78. * @return float
  79. */
  80. public function getValue()
  81. {
  82. return $this->value;
  83. }
  84. /**
  85. * @param float $value
  86. */
  87. public function setValue($value)
  88. {
  89. $this->value = $value;
  90. }
  91. public function __toString()
  92. {
  93. return $this->getId() ? (string) $this->getId() : 'n\a';
  94. }
  95. }