FamilyQuotient.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <?php
  2. namespace AppBundle\Entity\Billing;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Dunglas\ApiBundle\Annotation\Iri;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. use AppBundle\Entity\Traits\TimestampableEntity;
  9. use AppBundle\Entity\Traits\CreatorUpdaterEntity;
  10. /**
  11. * Définition d'une tranche de quotient familial
  12. *
  13. * @Iri("http://schema.org/FamilyQuotient")
  14. */
  15. #[ORM\Entity]
  16. class FamilyQuotient
  17. {
  18. use TimestampableEntity;
  19. use CreatorUpdaterEntity;
  20. /**
  21. * @var int
  22. */
  23. #[ORM\Column(type: 'integer')]
  24. #[ORM\Id]
  25. #[ORM\GeneratedValue(strategy: 'AUTO')]
  26. #[Groups(['familyquotient'])]
  27. private $id;
  28. /**
  29. * @var BillingSetting
  30. */
  31. #[ORM\ManyToOne(targetEntity: 'BillingSetting', inversedBy: 'familyQuotients')]
  32. #[ORM\JoinColumn(nullable: false)]
  33. #[Assert\NotNull]
  34. #[Groups(['familyquotient'])]
  35. private $billingSetting;
  36. /**
  37. * @var string
  38. *
  39. *
  40. */
  41. #[ORM\Column(type: 'string', nullable: true)]
  42. #[Assert\Type(type: 'string')]
  43. #[Groups(['familyquotient', 'familyquotient_reference', 'payer_list_accessbilling', 'fusion_accesses_accessbilling', 'student_list_accessbilling'])]
  44. private $sliceName;
  45. /**
  46. * @var string
  47. *
  48. *
  49. */
  50. #[ORM\Column(type: 'string', nullable: true)]
  51. #[Assert\Type(type: 'string')]
  52. #[Groups(['familyquotient', 'familyquotient_reference'])]
  53. private $lowerBound;
  54. /**
  55. * @var string
  56. *
  57. *
  58. */
  59. #[ORM\Column(type: 'string', nullable: true)]
  60. #[Assert\Type(type: 'string')]
  61. #[Groups(['familyquotient', 'familyquotient_reference'])]
  62. private $upperBound;
  63. /**
  64. * @var ArrayCollection<AccessBilling>
  65. */
  66. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Billing\AccessBilling', mappedBy: 'familyQuotient')]
  67. #[Groups(['familyquotient_accessbilling'])]
  68. private $accessBilling;
  69. /**
  70. * @var ArrayCollection<IntangibleDiscountDetail>
  71. */
  72. #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\IntangibleDiscountDetail', mappedBy: 'familyQuotient')]
  73. #[Groups(['familyquotient_intangiblediscountdetail'])]
  74. private $intangibleDiscountDetails;
  75. /**
  76. * Constructor
  77. */
  78. public function __construct()
  79. {
  80. $this->accessBilling = new ArrayCollection();
  81. $this->intangibleDiscountDetails = new ArrayCollection();
  82. }
  83. /**
  84. * Sets id.
  85. *
  86. * @param int $id
  87. *
  88. * @return $this
  89. */
  90. public function setId($id)
  91. {
  92. $this->id = $id;
  93. return $this;
  94. }
  95. /**
  96. * Gets id.
  97. *
  98. * @return int
  99. */
  100. public function getId()
  101. {
  102. return $this->id;
  103. }
  104. /**
  105. * Set sliceName
  106. *
  107. * @param string $sliceName
  108. *
  109. * @return FamilyQuotient
  110. */
  111. public function setSliceName($sliceName)
  112. {
  113. $this->sliceName = $sliceName;
  114. return $this;
  115. }
  116. /**
  117. * Get sliceName
  118. *
  119. * @return string
  120. */
  121. public function getSliceName()
  122. {
  123. return $this->sliceName;
  124. }
  125. /**
  126. * Set lowerBound
  127. *
  128. * @param string $lowerBound
  129. *
  130. * @return FamilyQuotient
  131. */
  132. public function setLowerBound($lowerBound)
  133. {
  134. $this->lowerBound = $lowerBound;
  135. return $this;
  136. }
  137. /**
  138. * Get lowerBound
  139. *
  140. * @return string
  141. */
  142. public function getLowerBound()
  143. {
  144. return $this->lowerBound;
  145. }
  146. /**
  147. * Set upperBound
  148. *
  149. * @param string $upperBound
  150. *
  151. * @return FamilyQuotient
  152. */
  153. public function setUpperBound($upperBound)
  154. {
  155. $this->upperBound = $upperBound;
  156. return $this;
  157. }
  158. /**
  159. * Get upperBound
  160. *
  161. * @return string
  162. */
  163. public function getUpperBound()
  164. {
  165. return $this->upperBound;
  166. }
  167. /**
  168. * Set billingSetting
  169. *
  170. * @param \AppBundle\Entity\Billing\BillingSetting $billingSetting
  171. *
  172. * @return FamilyQuotient
  173. */
  174. public function setBillingSetting(\AppBundle\Entity\Billing\BillingSetting $billingSetting)
  175. {
  176. $this->billingSetting = $billingSetting;
  177. return $this;
  178. }
  179. /**
  180. * Get billingSetting
  181. *
  182. * @return \AppBundle\Entity\Billing\BillingSetting
  183. */
  184. public function getBillingSetting()
  185. {
  186. return $this->billingSetting;
  187. }
  188. /**
  189. * Add accessBilling
  190. *
  191. * @param \AppBundle\Entity\Billing\AccessBilling $accessBilling
  192. *
  193. * @return FamilyQuotient
  194. */
  195. public function addAccessBilling(\AppBundle\Entity\Billing\AccessBilling $accessBilling)
  196. {
  197. $this->accessBilling[] = $accessBilling;
  198. return $this;
  199. }
  200. /**
  201. * Remove accessBilling
  202. *
  203. * @param \AppBundle\Entity\Billing\AccessBilling $accessBilling
  204. */
  205. public function removeAccessBilling(\AppBundle\Entity\Billing\AccessBilling $accessBilling)
  206. {
  207. $this->accessBilling->removeElement($accessBilling);
  208. }
  209. /**
  210. * Get accessBilling
  211. *
  212. * @return \Doctrine\Common\Collections\Collection
  213. */
  214. public function getAccessBilling()
  215. {
  216. return $this->accessBilling;
  217. }
  218. /**
  219. * Add intangibleDiscountDetail
  220. *
  221. * @param \AppBundle\Entity\Product\IntangibleDiscountDetail $intangibleDiscountDetail
  222. *
  223. * @return FamilyQuotient
  224. */
  225. public function addIntangibleDiscountDetail(\AppBundle\Entity\Product\IntangibleDiscountDetail $intangibleDiscountDetail)
  226. {
  227. $this->intangibleDiscountDetails[] = $intangibleDiscountDetail;
  228. return $this;
  229. }
  230. /**
  231. * Remove intangibleDiscountDetail
  232. *
  233. * @param \AppBundle\Entity\Product\IntangibleDiscountDetail $intangibleDiscountDetail
  234. */
  235. public function removeIntangibleDiscountDetail(\AppBundle\Entity\Product\IntangibleDiscountDetail $intangibleDiscountDetail)
  236. {
  237. $this->intangibleDiscountDetails->removeElement($intangibleDiscountDetail);
  238. }
  239. /**
  240. * Get intangibleDiscountDetails
  241. *
  242. * @return \Doctrine\Common\Collections\Collection
  243. */
  244. public function getIntangibleDiscountDetails()
  245. {
  246. return $this->intangibleDiscountDetails;
  247. }
  248. }