You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 line
1.1KB

  1. <?php
  2. namespace Lc\CaracoleBundle\Model\Config;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Lc\SovBundle\Doctrine\Pattern\AbstractLightEntity;
  5. /**
  6. * @ORM\MappedSuperclass()
  7. */
  8. abstract class TaxRateModel extends AbstractLightEntity
  9. {
  10. const BEHAVIOR_TAX_RATE_INCLUDED = 'tax-included';
  11. const BEHAVIOR_TAX_RATE_EXCLUDED = 'tax-excluded';
  12. public function getBehaviorTaxRateChoices(): array
  13. {
  14. return [
  15. self::BEHAVIOR_TAX_RATE_EXCLUDED,
  16. self::BEHAVIOR_TAX_RATE_INCLUDED,
  17. ];
  18. }
  19. /**
  20. * @ORM\Column(type="string", length=255)
  21. */
  22. protected $title;
  23. /**
  24. * @ORM\Column(type="float")
  25. */
  26. protected $value;
  27. public function __toString()
  28. {
  29. return $this->getTitle();
  30. }
  31. public function getTitle(): ?string
  32. {
  33. return $this->title;
  34. }
  35. public function setTitle(string $title): self
  36. {
  37. $this->title = $title;
  38. return $this;
  39. }
  40. public function getValue(): ?float
  41. {
  42. return $this->value;
  43. }
  44. public function setValue(float $value): self
  45. {
  46. $this->value = $value;
  47. return $this;
  48. }
  49. }