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