src/Entity/ReductionItem.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ReductionItemRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity(repositoryClass=ReductionItemRepository::class)
  7. */
  8. class ReductionItem
  9. {
  10. const TYPE_PERCENT = "pourcentage";
  11. const TYPE_FIXE = "valeurFixe";
  12. /**
  13. * @ORM\Id
  14. * @ORM\GeneratedValue
  15. * @ORM\Column(type="integer")
  16. */
  17. private $id;
  18. /**
  19. * @ORM\ManyToOne(targetEntity=ComptaType::class)
  20. */
  21. private $comptaType;
  22. /**
  23. * @ORM\Column(type="string", length=20)
  24. */
  25. private $type;
  26. /**
  27. * @ORM\Column(type="float")
  28. */
  29. private $value;
  30. /**
  31. * @ORM\ManyToOne(targetEntity=Reduction::class, inversedBy="reductionItems")
  32. * @ORM\JoinColumn(nullable=false)
  33. */
  34. private $reduction;
  35. public function getId(): ?int
  36. {
  37. return $this->id;
  38. }
  39. public function getComptaType(): ?ComptaType
  40. {
  41. return $this->comptaType;
  42. }
  43. public function setComptaType(?ComptaType $comptaType): self
  44. {
  45. $this->comptaType = $comptaType;
  46. return $this;
  47. }
  48. public function getType(): ?string
  49. {
  50. return $this->type;
  51. }
  52. public function setType(string $type): self
  53. {
  54. $this->type = $type;
  55. return $this;
  56. }
  57. public function getValue(): ?float
  58. {
  59. return $this->value;
  60. }
  61. public function setValue(float $value): self
  62. {
  63. $this->value = $value;
  64. return $this;
  65. }
  66. public function getReduction(): ?Reduction
  67. {
  68. return $this->reduction;
  69. }
  70. public function setReduction(?Reduction $reduction): self
  71. {
  72. $this->reduction = $reduction;
  73. return $this;
  74. }
  75. }