src/Entity/System/CarrierMaster.php line 16

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. * @ORM\Table(name="ps_carrier_master", indexes={
  7. *
  8. * @ORM\Index(name="id_carrier_master", columns={"id_carrier_master"})
  9. * })
  10. *
  11. * @ORM\Entity(repositoryClass="App\Repository\System\CarrierMasterRepository")
  12. */
  13. class CarrierMaster
  14. {
  15. public const PACK_SERVICE = 0;
  16. public const CHRONO_ID = 1;
  17. public const CORREOS_ID = 2;
  18. public const GLS_ID = 3;
  19. public const SEUR_ID = 4;
  20. public const WAREHOUSE_PICKUP = 5;
  21. public const TNT_ID = 6;
  22. public const ID_CAMPILLO = 7;
  23. public const DHL_ID = 10;
  24. public const UPS_ID = 11;
  25. public const DASHER_ID = 12;
  26. public const CORREOS_INTERNACIONAL_ID = 13;
  27. public const PALLET_DELIVERY_ID = 14;
  28. public const FBA_ID = 15;
  29. public const PACK_AND_COLLECT_ID = 16;
  30. public const SPECIAL_PREPARATION = 17;
  31. public const DHL_FREIGHT_ID = 18;
  32. public const ID_MOLDTRANS = 19;
  33. public const ID_XPO_LOGISTICS = 20;
  34. public const ID_KUEHNE_NAGEL = 21;
  35. public const ID_TRANSAHER = 22;
  36. public const ID_TRANSNATUR = 23;
  37. public const SFP_ID = 25;
  38. public const SPRING_ID = 26;
  39. public const ID_POSTAL_SERVICE = 26;
  40. public const ID_DPD = 30;
  41. public const ID_FEDEX = 32;
  42. public const ID_MIRAVIA = 33;
  43. public const DB_SHENKER_ID = 27;
  44. public const ID_COLISSIMO = 28;
  45. public const CHRONOPOST_ID = 29;
  46. public const STANDARD_SHIPMENT_ID = 31;
  47. public const FEDEX_ID = 32;
  48. public const MIRAVIA_ID = 33;
  49. public const SMART_SHIPMENT_ID = 37;
  50. public const RHENUS_ID = 41;
  51. public const AMAZON_VENDOR_DF_ID = 42;
  52. public const A4BDATA_REFERENCE_UPS = 'UPS';
  53. public const CARRIER_MASTER_IDS_INDEXED_BY_CARRIER_MASTER_NAMES = [
  54. 'chrono' => self::CHRONO_ID,
  55. 'correos' => self::CORREOS_ID,
  56. 'gls' => self::GLS_ID,
  57. 'ups' => self::UPS_ID,
  58. 'dhl' => self::DHL_ID,
  59. 'tnt' => self::TNT_ID,
  60. 'seur' => self::SEUR_ID,
  61. 'correos international' => self::CORREOS_INTERNACIONAL_ID,
  62. 'fba' => self::FBA_ID,
  63. 'special preparation' => self::SPECIAL_PREPARATION,
  64. 'exw' => self::WAREHOUSE_PICKUP,
  65. 'pc' => self::PACK_AND_COLLECT_ID,
  66. 'pallet delivery' => self::PALLET_DELIVERY_ID,
  67. 'dachser' => self::DASHER_ID,
  68. 'dhl freight' => self::DHL_FREIGHT_ID,
  69. 'sfp' => self::SFP_ID,
  70. 'postal service' => self::SPRING_ID,
  71. 'chronopost' => self::CHRONOPOST_ID,
  72. 'standard shipment' => self::STANDARD_SHIPMENT_ID,
  73. 'fedex' => self::FEDEX_ID,
  74. 'db schenker' => self::DB_SHENKER_ID,
  75. 'miravia' => self::MIRAVIA_ID,
  76. 'smart shipment' => self::SMART_SHIPMENT_ID,
  77. 'rhenus' => self::RHENUS_ID,
  78. 'amazon vendor df' => self::AMAZON_VENDOR_DF_ID,
  79. ];
  80. /**
  81. * @var int
  82. *
  83. * @ORM\Id()
  84. *
  85. * @ORM\GeneratedValue(strategy="NONE")
  86. *
  87. * @ORM\Column(name="id_carrier_master", type="integer")
  88. */
  89. private $id;
  90. /**
  91. * @var string
  92. *
  93. * @ORM\Column(type="string", length=30)
  94. */
  95. private $name;
  96. /**
  97. * @var bool
  98. *
  99. * @ORM\Column(type="boolean")
  100. */
  101. private $apiEnabled;
  102. /**
  103. * @var bool
  104. *
  105. * @ORM\Column(type="boolean")
  106. */
  107. private $dropshipping;
  108. /**
  109. * @var bool
  110. *
  111. * @ORM\Column(type="boolean", name="`system`")
  112. */
  113. private $system;
  114. /**
  115. * @var string
  116. *
  117. * @ORM\Column(type="string", length=32)
  118. */
  119. private $key;
  120. /**
  121. * @var bool
  122. *
  123. * @ORM\Column(type="boolean")
  124. */
  125. private $tracking;
  126. /**
  127. * @var bool
  128. *
  129. * @ORM\Column(name="orders_csv", type="boolean")
  130. */
  131. private $orderCsv;
  132. /**
  133. * @var bool
  134. *
  135. * @ORM\Column(name="orders", type="boolean")
  136. */
  137. private $orders;
  138. /**
  139. * @var Collection<int, Carrier>&iterable<Carrier>
  140. *
  141. * @ORM\OneToMany(targetEntity="App\Entity\System\Carrier", mappedBy="carrierMaster")
  142. */
  143. private $carriers;
  144. public function getName(): string
  145. {
  146. return $this->name;
  147. }
  148. public function setName(string $name): self
  149. {
  150. $this->name = $name;
  151. return $this;
  152. }
  153. public function getId(): int
  154. {
  155. return $this->id;
  156. }
  157. public function getKey(): string
  158. {
  159. return $this->key;
  160. }
  161. public function setKey(string $key): self
  162. {
  163. $this->key = $key;
  164. return $this;
  165. }
  166. public function setId(int $id): void
  167. {
  168. $this->id = $id;
  169. }
  170. public function isApiEnabled(): bool
  171. {
  172. return $this->apiEnabled;
  173. }
  174. public function setApiEnabled(bool $apiEnabled): CarrierMaster
  175. {
  176. $this->apiEnabled = $apiEnabled;
  177. return $this;
  178. }
  179. public function isDropshipping(): bool
  180. {
  181. return $this->dropshipping;
  182. }
  183. public function setDropshipping(bool $dropshipping): CarrierMaster
  184. {
  185. $this->dropshipping = $dropshipping;
  186. return $this;
  187. }
  188. public function isSystem(): bool
  189. {
  190. return $this->system;
  191. }
  192. public function setSystem(bool $system): CarrierMaster
  193. {
  194. $this->system = $system;
  195. return $this;
  196. }
  197. public function isTracking(): bool
  198. {
  199. return $this->tracking;
  200. }
  201. public function setTracking(bool $tracking): CarrierMaster
  202. {
  203. $this->tracking = $tracking;
  204. return $this;
  205. }
  206. public function isOrderCsv(): bool
  207. {
  208. return $this->orderCsv;
  209. }
  210. public function setOrderCsv(bool $orderCsv): CarrierMaster
  211. {
  212. $this->orderCsv = $orderCsv;
  213. return $this;
  214. }
  215. public function isOrders(): bool
  216. {
  217. return $this->orders;
  218. }
  219. public function setOrders(bool $orders): CarrierMaster
  220. {
  221. $this->orders = $orders;
  222. return $this;
  223. }
  224. /**
  225. * @param Collection<int, Carrier>&iterable<Carrier> $carriers
  226. */
  227. public function setCarriers($carriers): CarrierMaster
  228. {
  229. $this->carriers = $carriers;
  230. return $this;
  231. }
  232. /**
  233. * @return Collection<int, Carrier>&iterable<Carrier>
  234. */
  235. public function getCarriers()
  236. {
  237. return $this->carriers;
  238. }
  239. }