src/Entity/System/TaxRule.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Table(name="ps_tax_rule", indexes={
  6. *
  7. * @ORM\Index(name="category_getproducts", columns={"id_tax_rules_group", "id_country", "id_state"}),
  8. * @ORM\Index(name="ps_tax_rule_id_tax_index", columns={"id_tax"}),
  9. * @ORM\Index(name="ps_tax_rule_description_index", columns={"description"})
  10. * })
  11. *
  12. * @ORM\Entity(repositoryClass="App\Repository\System\TaxRuleRepository")
  13. */
  14. class TaxRule
  15. {
  16. /**
  17. * @var int|null
  18. *
  19. * @ORM\Id
  20. *
  21. * @ORM\GeneratedValue(strategy="AUTO")
  22. *
  23. * @ORM\Column(type="integer", name="id_tax_rule")
  24. */
  25. private $id;
  26. /**
  27. * @var TaxRuleGroup
  28. *
  29. * @ORM\ManyToOne(targetEntity="TaxRuleGroup")
  30. *
  31. * @ORM\JoinColumn(name="id_tax_rules_group", referencedColumnName="id_tax_rules_group", nullable=false)
  32. */
  33. private $taxRuleGroup;
  34. /**
  35. * @var Country
  36. *
  37. * @ORM\ManyToOne(targetEntity="App\Entity\System\Country")
  38. *
  39. * @ORM\JoinColumn(name="id_country", referencedColumnName="id_country")
  40. */
  41. private $country;
  42. /**
  43. * @var State
  44. *
  45. * @ORM\Column(type="integer", name="id_state")
  46. */
  47. private $state;
  48. /**
  49. * @var int
  50. *
  51. * @ORM\Column(type="integer")
  52. */
  53. private $behavior;
  54. /**
  55. * @var string
  56. *
  57. * @ORM\Column(type="string", name="description", length=2)
  58. */
  59. private $countryDestinationIso;
  60. /**
  61. * @var Tax
  62. *
  63. * @ORM\ManyToOne(targetEntity="App\Entity\System\Tax")
  64. *
  65. * @ORM\JoinColumn(name="id_tax", referencedColumnName="id_tax")
  66. */
  67. private $tax;
  68. /**
  69. * @var string
  70. *
  71. * @ORM\Column(type="string", name="country_origin", length=2)
  72. */
  73. private $countryOriginIso;
  74. public function getId(): ?int
  75. {
  76. return $this->id;
  77. }
  78. public function setId(int $id): TaxRule
  79. {
  80. $this->id = $id;
  81. return $this;
  82. }
  83. public function getTaxRuleGroup(): TaxRuleGroup
  84. {
  85. return $this->taxRuleGroup;
  86. }
  87. public function setTaxRuleGroup(TaxRuleGroup $taxRuleGroup): TaxRule
  88. {
  89. $this->taxRuleGroup = $taxRuleGroup;
  90. return $this;
  91. }
  92. public function getCountry(): Country
  93. {
  94. return $this->country;
  95. }
  96. public function setCountry(Country $country): TaxRule
  97. {
  98. $this->country = $country;
  99. return $this;
  100. }
  101. public function getState(): State
  102. {
  103. return $this->state;
  104. }
  105. public function setState(State $state): TaxRule
  106. {
  107. $this->state = $state;
  108. return $this;
  109. }
  110. public function getBehavior(): int
  111. {
  112. return $this->behavior;
  113. }
  114. public function setBehavior(int $behavior): TaxRule
  115. {
  116. $this->behavior = $behavior;
  117. return $this;
  118. }
  119. public function getCountryDestinationIso(): string
  120. {
  121. return $this->countryDestinationIso;
  122. }
  123. public function setCountryDestinationIso(string $countryDestinationIso): TaxRule
  124. {
  125. $this->countryDestinationIso = $countryDestinationIso;
  126. return $this;
  127. }
  128. public function getTax(): Tax
  129. {
  130. return $this->tax;
  131. }
  132. public function setTax(Tax $tax): TaxRule
  133. {
  134. $this->tax = $tax;
  135. return $this;
  136. }
  137. public function getCountryOriginIso(): string
  138. {
  139. return $this->countryOriginIso;
  140. }
  141. public function setCountryOriginIso(string $countryOriginIso): TaxRule
  142. {
  143. $this->countryOriginIso = $countryOriginIso;
  144. return $this;
  145. }
  146. }