src/AdminBundle/Entity/PriceThreshold.php line 11

Open in your IDE?
  1. <?php
  2. namespace AdminBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * PriceThreshold
  6. */
  7. #[ORM\Table(name: 'price_threshold')]
  8. #[ORM\Entity]
  9. class PriceThreshold 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 integer
  20. */
  21. #[ORM\Column(name: 'start', type: 'integer')]
  22. protected $start;
  23. /**
  24. * @var integer
  25. */
  26. #[ORM\Column(name: 'end', type: 'integer')]
  27. protected $end;
  28. /**
  29. * @return int
  30. */
  31. public function getId()
  32. {
  33. return $this->id;
  34. }
  35. /**
  36. * @param int $id
  37. */
  38. public function setId($id)
  39. {
  40. $this->id = $id;
  41. }
  42. /**
  43. * @return int
  44. */
  45. public function getStart()
  46. {
  47. return $this->start;
  48. }
  49. /**
  50. * @param int $start
  51. */
  52. public function setStart($start)
  53. {
  54. $this->start = $start;
  55. }
  56. /**
  57. * @return int
  58. */
  59. public function getEnd()
  60. {
  61. return $this->end;
  62. }
  63. /**
  64. * @param int $end
  65. */
  66. public function setEnd($end)
  67. {
  68. $this->end = $end;
  69. }
  70. public function getStartEnd() {
  71. return $this->start.' - '.$this->end;
  72. }
  73. public function __toString()
  74. {
  75. return $this->getId() ? (string) $this->getId() : 'n\a';
  76. }
  77. }