src/Entity/System/Supplier.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * Supplier
  6. *
  7. * @ORM\Table(indexes={
  8. *
  9. * @ORM\Index(name="show_extern", columns={"show_extern"}),
  10. * @ORM\Index(name="envio24_48", columns={"envio24_48"})
  11. * })
  12. *
  13. * @ORM\Entity(repositoryClass="App\Repository\System\SupplierRepository")
  14. */
  15. class Supplier
  16. {
  17. public const PREPARATION_CUT_TIME_SUBSTRACT_MINUTES = 60;
  18. public const MAX_CANCELLATION_TIME_SUBSTRACT_MINUTES = 90;
  19. public const INNOVAGOODS_ID = 151309;
  20. public const PRCHING_IMPORT_EXPORT_ID = 127427;
  21. public const DELAX_ID = 1112554;
  22. public const KHIAM_ID = 1282234;
  23. /**
  24. * @var int
  25. *
  26. * @ORM\Column(type="integer", length=10)
  27. *
  28. * @ORM\Id
  29. */
  30. private $id;
  31. /**
  32. * @var string|null
  33. *
  34. * @ORM\Column(type="string" , length=100, nullable=true)
  35. */
  36. private $name;
  37. /**
  38. * @var int|null
  39. *
  40. * @ORM\Column(type="integer" , name="tiempo_min", nullable=true)
  41. */
  42. private $minimumTime;
  43. /**
  44. * @var int|null
  45. *
  46. * @ORM\Column(type="integer" , name="tiempo_max", nullable=true)
  47. */
  48. private $maximumTime;
  49. /**
  50. * @var bool|null
  51. *
  52. * @ORM\Column(type="boolean", nullable=true)
  53. */
  54. private $sincronized;
  55. /**
  56. * @var bool|null
  57. *
  58. * @ORM\Column(type="boolean", nullable=true)
  59. */
  60. private $onlyPack;
  61. /**
  62. * @var bool
  63. *
  64. * @ORM\Column(type="boolean")
  65. */
  66. private $notDiscounts = false;
  67. /**
  68. * @var string|null
  69. *
  70. * @ORM\Column(type="string" , length=255, nullable=true)
  71. */
  72. private $sendOrderUrl;
  73. /**
  74. * @var bool|null
  75. *
  76. * @ORM\Column(type="boolean", name="avisame", options={"default" : 0}, nullable=true)
  77. */
  78. private $letMeKnow;
  79. /**
  80. * @var int|null
  81. *
  82. * @ORM\Column(type="integer", name="destacados", length=11, options={"default" : 0}, nullable=true)
  83. */
  84. private $highlights;
  85. /**
  86. * @var int
  87. *
  88. * @ORM\Column(type="integer", name="stock_seguridad", length=11, options={"default" : 0})
  89. */
  90. private $securityStock;
  91. /**
  92. * @var string|null
  93. *
  94. * @ORM\Column(type="string", name="hora_maxima_cancelacion", length=10, nullable=true)
  95. */
  96. private $maximumCancellationTime;
  97. /**
  98. * @var int|null
  99. *
  100. * @ORM\Column(type="integer", name="envio24_48", length=1, options={"default" : 0}, nullable=true)
  101. */
  102. private $shipping24_48;
  103. /**
  104. * @var int|null
  105. *
  106. * @ORM\Column(type="integer", length=1, options={"default" : 0}, nullable=true)
  107. */
  108. private $showExtern;
  109. /**
  110. * @var int
  111. *
  112. * @ORM\Column(type="integer", length=5, options={"default" : 0})
  113. */
  114. private $delay;
  115. /**
  116. * @var int|null
  117. *
  118. * @ORM\Column(type="integer", length=11, options={"default" : 0}, nullable=true)
  119. */
  120. private $expeditionDays;
  121. /**
  122. * @var string|null
  123. *
  124. * @ORM\Column(type="string", length=10, options={"default" : "12:00:00"}, nullable=true)
  125. */
  126. private $expeditionMessageTime;
  127. /**
  128. * @var bool|null
  129. *
  130. * @ORM\Column(type="boolean", options={"default" : 0}, nullable=true)
  131. */
  132. private $forceStockExtern;
  133. /**
  134. * @var int
  135. *
  136. * @ORM\Column(type="integer", name="expedition_days_3_5", length=11)
  137. */
  138. private $expeditionDays3To5;
  139. /**
  140. * @var bool|null
  141. *
  142. * @ORM\Column(type="boolean", options={"default" : 0}, nullable=true)
  143. */
  144. private $commissionType;
  145. /**
  146. * @var string|null
  147. *
  148. * @ORM\Column(type="text" ,nullable=true)
  149. */
  150. private $holidays;
  151. /**
  152. * @return int
  153. */
  154. public function getId(): int
  155. {
  156. return $this->id;
  157. }
  158. /**
  159. * @param int $id
  160. *
  161. * @return Supplier
  162. */
  163. public function setId(int $id): Supplier
  164. {
  165. $this->id = $id;
  166. return $this;
  167. }
  168. /**
  169. * @return string|null
  170. */
  171. public function getName(): ?string
  172. {
  173. return $this->name;
  174. }
  175. /**
  176. * @param string|null $name
  177. *
  178. * @return Supplier
  179. */
  180. public function setName(?string $name): Supplier
  181. {
  182. $this->name = $name;
  183. return $this;
  184. }
  185. /**
  186. * @return int|null
  187. */
  188. public function getMinimumTime(): ?int
  189. {
  190. return $this->minimumTime;
  191. }
  192. /**
  193. * @param int|null $minimumTime
  194. *
  195. * @return Supplier
  196. */
  197. public function setMinimumTime(?int $minimumTime): Supplier
  198. {
  199. $this->minimumTime = $minimumTime;
  200. return $this;
  201. }
  202. /**
  203. * @return int|null
  204. */
  205. public function getMaximumTime(): ?int
  206. {
  207. return $this->maximumTime;
  208. }
  209. /**
  210. * @param int|null $maximumTime
  211. *
  212. * @return Supplier
  213. */
  214. public function setMaximumTime(?int $maximumTime): Supplier
  215. {
  216. $this->maximumTime = $maximumTime;
  217. return $this;
  218. }
  219. /**
  220. * @return bool|null
  221. */
  222. public function getSincronized(): ?bool
  223. {
  224. return $this->sincronized;
  225. }
  226. /**
  227. * @param bool|null $sincronized
  228. *
  229. * @return Supplier
  230. */
  231. public function setSincronized(?bool $sincronized): Supplier
  232. {
  233. $this->sincronized = $sincronized;
  234. return $this;
  235. }
  236. /**
  237. * @return bool|null
  238. */
  239. public function getOnlyPack(): ?bool
  240. {
  241. return $this->onlyPack;
  242. }
  243. /**
  244. * @param bool|null $onlyPack
  245. *
  246. * @return Supplier
  247. */
  248. public function setOnlyPack(?bool $onlyPack): Supplier
  249. {
  250. $this->onlyPack = $onlyPack;
  251. return $this;
  252. }
  253. public function getNotDiscounts(): bool
  254. {
  255. return $this->notDiscounts;
  256. }
  257. public function setNotDiscounts(bool $notDiscounts): Supplier
  258. {
  259. $this->notDiscounts = $notDiscounts;
  260. return $this;
  261. }
  262. /**
  263. * @return string|null
  264. */
  265. public function getSendOrderUrl(): ?string
  266. {
  267. return $this->sendOrderUrl;
  268. }
  269. /**
  270. * @param string|null $sendOrderUrl
  271. *
  272. * @return Supplier
  273. */
  274. public function setSendOrderUrl(?string $sendOrderUrl): Supplier
  275. {
  276. $this->sendOrderUrl = $sendOrderUrl;
  277. return $this;
  278. }
  279. /**
  280. * @return bool|null
  281. */
  282. public function getLetMeKnow(): ?bool
  283. {
  284. return $this->letMeKnow;
  285. }
  286. /**
  287. * @param bool|null $letMeKnow
  288. *
  289. * @return Supplier
  290. */
  291. public function setLetMeKnow(?bool $letMeKnow): Supplier
  292. {
  293. $this->letMeKnow = $letMeKnow;
  294. return $this;
  295. }
  296. /**
  297. * @return int|null
  298. */
  299. public function getHighlights(): ?int
  300. {
  301. return $this->highlights;
  302. }
  303. /**
  304. * @param int|null $highlights
  305. *
  306. * @return Supplier
  307. */
  308. public function setHighlights(?int $highlights): Supplier
  309. {
  310. $this->highlights = $highlights;
  311. return $this;
  312. }
  313. /**
  314. * @return int
  315. */
  316. public function getSecurityStock(): int
  317. {
  318. return $this->securityStock;
  319. }
  320. /**
  321. * @param int $securityStock
  322. *
  323. * @return Supplier
  324. */
  325. public function setSecurityStock(int $securityStock): Supplier
  326. {
  327. $this->securityStock = $securityStock;
  328. return $this;
  329. }
  330. /**
  331. * @return string|null
  332. */
  333. public function getMaximumCancellationTime(): ?string
  334. {
  335. return $this->maximumCancellationTime;
  336. }
  337. /**
  338. * @param string|null $maximumCancellationTime
  339. *
  340. * @return Supplier
  341. */
  342. public function setMaximumCancellationTime(?string $maximumCancellationTime): Supplier
  343. {
  344. $this->maximumCancellationTime = $maximumCancellationTime;
  345. return $this;
  346. }
  347. /**
  348. * @return int|null
  349. */
  350. public function getShipping2448(): ?int
  351. {
  352. return $this->shipping24_48;
  353. }
  354. /**
  355. * @param int|null $shipping24_48
  356. *
  357. * @return Supplier
  358. */
  359. public function setShipping2448(?int $shipping24_48): Supplier
  360. {
  361. $this->shipping24_48 = $shipping24_48;
  362. return $this;
  363. }
  364. /**
  365. * @return int|null
  366. */
  367. public function getShowExtern(): ?int
  368. {
  369. return $this->showExtern;
  370. }
  371. /**
  372. * @param int|null $showExtern
  373. *
  374. * @return Supplier
  375. */
  376. public function setShowExtern(?int $showExtern): Supplier
  377. {
  378. $this->showExtern = $showExtern;
  379. return $this;
  380. }
  381. /**
  382. * @return int
  383. */
  384. public function getDelay(): int
  385. {
  386. return $this->delay;
  387. }
  388. /**
  389. * @param int $delay
  390. *
  391. * @return Supplier
  392. */
  393. public function setDelay(int $delay): Supplier
  394. {
  395. $this->delay = $delay;
  396. return $this;
  397. }
  398. /**
  399. * @return int|null
  400. */
  401. public function getExpeditionDays(): ?int
  402. {
  403. return $this->expeditionDays;
  404. }
  405. /**
  406. * @param int|null $expeditionDays
  407. *
  408. * @return Supplier
  409. */
  410. public function setExpeditionDays(?int $expeditionDays): Supplier
  411. {
  412. $this->expeditionDays = $expeditionDays;
  413. return $this;
  414. }
  415. /**
  416. * @return string|null
  417. */
  418. public function getExpeditionMessageTime(): ?string
  419. {
  420. return $this->expeditionMessageTime;
  421. }
  422. /**
  423. * @param string|null $expeditionMessageTime
  424. *
  425. * @return Supplier
  426. */
  427. public function setExpeditionMessageTime(?string $expeditionMessageTime): Supplier
  428. {
  429. $this->expeditionMessageTime = $expeditionMessageTime;
  430. return $this;
  431. }
  432. /**
  433. * @return bool|null
  434. */
  435. public function isForceStockExtern(): ?bool
  436. {
  437. return $this->forceStockExtern;
  438. }
  439. /**
  440. * @param bool|null $forceStockExtern
  441. *
  442. * @return Supplier
  443. */
  444. public function setForceStockExtern(?bool $forceStockExtern): Supplier
  445. {
  446. $this->forceStockExtern = $forceStockExtern;
  447. return $this;
  448. }
  449. public function getExpeditionDays3To5(): int
  450. {
  451. return $this->expeditionDays3To5;
  452. }
  453. public function setExpeditionDays3To5(int $expeditionDays3To5): Supplier
  454. {
  455. $this->expeditionDays3To5 = $expeditionDays3To5;
  456. return $this;
  457. }
  458. public function getCommissionType(): ?bool
  459. {
  460. return $this->commissionType;
  461. }
  462. public function setCommissionType(?bool $commissionType): Supplier
  463. {
  464. $this->commissionType = $commissionType;
  465. return $this;
  466. }
  467. public function getHolidays(): array
  468. {
  469. return $this->holidays ? \json_decode($this->holidays, true) : [];
  470. }
  471. public function setHolidays(?array $holidays): self
  472. {
  473. $this->holidays = $holidays ? \json_encode($holidays, JSON_THROW_ON_ERROR) : '[]';
  474. return $this;
  475. }
  476. }