src/Entity/System/Pack.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\Common\Collections\Collection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * Pack
  7. *
  8. * @ORM\Table(name="ps_pack")
  9. *
  10. * @ORM\Entity(repositoryClass="App\Repository\System\PackRepository")
  11. */
  12. class Pack
  13. {
  14. public const PACK_WITHOUT_PACK = 0;
  15. public const PACK_WITHOUT_PACK_NAME = 'NONE';
  16. public const PACK_BASIC = 1;
  17. public const PACK_BASIC_NAME = 'BASIC';
  18. public const PACK_PRO = 2;
  19. public const PACK_PRO_NAME = 'PRO';
  20. public const PACK_BUSINESS = 150;
  21. public const PACK_BUSINESS_NAME = 'BUSINESS';
  22. public const PACK_PREMIUM = 151;
  23. public const PACK_PREMIUM_NAME = 'PREMIUM';
  24. public const PACK_FREE = 167;
  25. public const PACK_FREE_NAME = 'FREE';
  26. public const PACK_RENTING = 195;
  27. public const PACK_RENTING_NAME = 'RENTING';
  28. public const PACK_B2B = 201;
  29. public const PACK_B2B_NAME = 'B2B';
  30. public const PACK_DROPSHIP = 202;
  31. public const PACK_DROPSHIP_NAME = 'DROPSHIP';
  32. public const PACK_ENTERPRISE = 203;
  33. public const PACK_ENTERPRISE_NAME = 'ENTERPRISE';
  34. public const PACK_ECOMMERCE = 210;
  35. public const PACK_ECOMMERCE_NAME = 'ECOMMERCE';
  36. public const PACK_MARKETPLACES = 211;
  37. public const PACK_MARKETPLACES_NAME = 'MARKETPLACES';
  38. public const OLD_B2B_PRICE = 45;
  39. public const AVAILABLE_ADMIN_CREATION_PACK_IDS = [
  40. self::PACK_B2B,
  41. ];
  42. public const AVAILABLE_PACK_IDS = [
  43. self::PACK_B2B,
  44. self::PACK_ECOMMERCE,
  45. self::PACK_MARKETPLACES,
  46. ];
  47. public const PACK_NAMES_INDEXED_BY_ID = [
  48. self::PACK_WITHOUT_PACK => self::PACK_WITHOUT_PACK_NAME,
  49. self::PACK_BASIC => self::PACK_BASIC_NAME,
  50. self::PACK_PRO => self::PACK_PRO_NAME,
  51. self::PACK_BUSINESS => self::PACK_BUSINESS_NAME,
  52. self::PACK_PREMIUM => self::PACK_PREMIUM_NAME,
  53. self::PACK_FREE => self::PACK_FREE_NAME,
  54. self::PACK_RENTING => self::PACK_RENTING_NAME,
  55. self::PACK_B2B => self::PACK_B2B_NAME,
  56. self::PACK_DROPSHIP => self::PACK_DROPSHIP_NAME,
  57. self::PACK_ENTERPRISE => self::PACK_ENTERPRISE_NAME,
  58. self::PACK_ECOMMERCE => self::PACK_ECOMMERCE_NAME,
  59. self::PACK_MARKETPLACES => self::PACK_MARKETPLACES_NAME,
  60. ];
  61. public const PACK_B2B_REFERENCE = 'PACKB2B';
  62. public const DROPSHIPPING_PACK_INDEXED_BY_ID = [
  63. self::PACK_PRO => self::PACK_PRO_NAME,
  64. self::PACK_BUSINESS => self::PACK_BUSINESS_NAME,
  65. self::PACK_PREMIUM => self::PACK_PREMIUM_NAME,
  66. self::PACK_B2B => self::PACK_B2B_NAME,
  67. self::PACK_DROPSHIP => self::PACK_DROPSHIP_NAME,
  68. self::PACK_ENTERPRISE => self::PACK_ENTERPRISE_NAME,
  69. self::PACK_ECOMMERCE => self::PACK_ECOMMERCE_NAME,
  70. self::PACK_MARKETPLACES => self::PACK_MARKETPLACES_NAME,
  71. ];
  72. public const AVAILABLE_WHOLESALE_PACKS_IDS = [
  73. self::PACK_ECOMMERCE,
  74. self::PACK_MARKETPLACES,
  75. ];
  76. /**
  77. * @var int
  78. *
  79. * @ORM\Id
  80. *
  81. * @ORM\Column(type="integer", name="id_pack")
  82. */
  83. private $id;
  84. /**
  85. * @var string
  86. *
  87. * @ORM\Column(type="string", length=32, unique=true)
  88. */
  89. private $key;
  90. /**
  91. * @var iterable<PackLanguage>&Collection<int, PackLanguage>
  92. *
  93. * @ORM\OneToMany(targetEntity="App\Entity\System\PackLanguage", mappedBy="pack")
  94. */
  95. private $packLanguages;
  96. /**
  97. * @var iterable<Subscription>&Collection<int, Subscription>
  98. *
  99. * @ORM\OneToMany(targetEntity="App\Entity\System\Subscription", mappedBy="pack")
  100. */
  101. private $subscriptions;
  102. /**
  103. * @return int
  104. */
  105. public function getId(): int
  106. {
  107. return $this->id;
  108. }
  109. /**
  110. * @param int $id
  111. *
  112. * @return Pack
  113. */
  114. public function setId(int $id): self
  115. {
  116. $this->id = $id;
  117. return $this;
  118. }
  119. public function getKey(): string
  120. {
  121. return $this->key;
  122. }
  123. public function setKey(string $key): Pack
  124. {
  125. $this->key = $key;
  126. return $this;
  127. }
  128. /**
  129. * @return PackLanguage[]|Collection<int, PackLanguage>
  130. */
  131. public function getPackLanguages()
  132. {
  133. return $this->packLanguages;
  134. }
  135. /**
  136. * @param PackLanguage[]|Collection<int, PackLanguage> $packLanguages
  137. */
  138. public function setPackLanguages($packLanguages): Pack
  139. {
  140. $this->packLanguages = $packLanguages;
  141. return $this;
  142. }
  143. /**
  144. * @return Subscription[]|Collection<int, Subscription>
  145. */
  146. public function getSubscriptions()
  147. {
  148. return $this->subscriptions;
  149. }
  150. /**
  151. * @param Subscription[]|Collection<int, Subscription> $subscriptions
  152. */
  153. public function setSubscriptions($subscriptions): Pack
  154. {
  155. $this->subscriptions = $subscriptions;
  156. return $this;
  157. }
  158. }