vendor/croisiland/common-bundle/src/Entity/Price/ServiceCharge.php line 15

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Croisiland\CommonBundle\Entity\Price;
  4. use Crea\ToolsBundle\Entity\LifecycleUserIdentifierTrait;
  5. use Croisiland\CommonBundle\Entity\Traits\CurrencyTrait;
  6. use Croisiland\CommonBundle\Repository\Price\ServiceChargeRepository;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9. * @ORM\Entity(repositoryClass=ServiceChargeRepository::class)
  10. */
  11. class ServiceCharge
  12. {
  13. use LifecycleUserIdentifierTrait;
  14. use CurrencyTrait;
  15. /**
  16. * @ORM\Id
  17. *
  18. * @ORM\GeneratedValue
  19. *
  20. * @ORM\Column(type="integer")
  21. */
  22. private ?int $id = null;
  23. /**
  24. * @ORM\ManyToOne(targetEntity=ServiceChargeType::class)
  25. *
  26. * @ORM\JoinColumn(nullable=true)
  27. */
  28. private ?ServiceChargeType $type = null;
  29. /**
  30. * @ORM\Column(type="float")
  31. */
  32. private ?float $amount = null;
  33. /**
  34. * @ORM\Column(type="float")
  35. */
  36. private ?float $total = null;
  37. /**
  38. * @ORM\ManyToOne(targetEntity=Price::class, inversedBy="serviceCharges")
  39. *
  40. * @ORM\JoinColumn(nullable=false)
  41. */
  42. private ?Price $price = null;
  43. /**
  44. * @ORM\Column(type="integer")
  45. */
  46. private int $position = 0;
  47. public function getId(): ?int
  48. {
  49. return $this->id;
  50. }
  51. public function getType(): ?ServiceChargeType
  52. {
  53. return $this->type;
  54. }
  55. public function setType(ServiceChargeType $type): self
  56. {
  57. $this->type = $type;
  58. return $this;
  59. }
  60. public function getAmount(): ?float
  61. {
  62. return $this->amount;
  63. }
  64. public function setAmount(float $amount): self
  65. {
  66. $this->amount = $amount;
  67. return $this;
  68. }
  69. public function getTotal(): ?float
  70. {
  71. return $this->total;
  72. }
  73. public function setTotal(float $total): self
  74. {
  75. $this->total = $total;
  76. return $this;
  77. }
  78. public function getPrice(): ?Price
  79. {
  80. return $this->price;
  81. }
  82. public function setPrice(?Price $price): self
  83. {
  84. $this->price = $price;
  85. return $this;
  86. }
  87. public function getPosition(): int
  88. {
  89. return $this->position;
  90. }
  91. public function setPosition(int $position): self
  92. {
  93. $this->position = $position;
  94. return $this;
  95. }
  96. }