src/Entity/Dealer.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Cocur\Slugify\Slugify;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use App\Entity\Behaviors\TranslatableTrait;
  8. use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
  9. use Symfony\Component\HttpFoundation\File\File;
  10. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  11. use Symfony\Component\Validator\Constraints as Assert;
  12. /**
  13. * @ORM\Entity(repositoryClass="App\Repository\DealerRepository")
  14. * @ORM\EntityListeners({"App\Listener\EntityListener"})
  15. * @Vich\Uploadable()
  16. */
  17. class Dealer implements TranslatableInterface
  18. {
  19. use TranslatableTrait;
  20. public const FEED_TYPE=[
  21. 'FREEPORT' => 'Freeport feed',
  22. 'PRODES' => 'Prodes Google feed',
  23. 'SHOPTET' => 'Shoptet feed',
  24. 'SHOPTET_CSV' => 'Shoptet feed CSV'
  25. ];
  26. public const COUNT_APP_PRODUCTS = 20;
  27. /**
  28. * @ORM\Id()
  29. * @ORM\GeneratedValue()
  30. * @ORM\Column(type="integer")
  31. */
  32. private $id;
  33. /**
  34. * @Vich\UploadableField(mapping="dealer_logo", fileNameProperty="image")
  35. * @Assert\Image(mimeTypes={"image/png", "image/jpeg", "image/jpg", "image/gif"})
  36. * @var File|null
  37. */
  38. private $imageFile;
  39. /**
  40. * @ORM\Column(type="string", length=199, nullable=true)
  41. */
  42. private $image;
  43. /**
  44. * @ORM\Column(type="string", length=199, nullable=true)
  45. */
  46. private $code;
  47. /**
  48. * @ORM\Column(type="boolean")
  49. */
  50. private $isActive = true;
  51. /**
  52. * @ORM\Column(type="string", length=190)
  53. */
  54. private $name;
  55. /**
  56. * @ORM\Column(type="string", length=190)
  57. */
  58. private $slug;
  59. /**
  60. * @ORM\Column(type="string", length=190, nullable=true)
  61. */
  62. private $companyName;
  63. /**
  64. * @ORM\Column(type="string", length=10, nullable=true)
  65. */
  66. private $ico;
  67. /**
  68. * @ORM\Column(type="string", length=20, nullable=true)
  69. */
  70. private $dic;
  71. /**
  72. * @ORM\Column(type="string", length=255, nullable=true)
  73. */
  74. private $street;
  75. /**
  76. * @ORM\Column(type="string", length=255, nullable=true)
  77. */
  78. private $city;
  79. /**
  80. * @ORM\Column(type="string", length=20, nullable=true)
  81. */
  82. private $zip;
  83. /**
  84. * @ORM\Column(type="string", length=100, nullable=true)
  85. */
  86. private $streetNumber;
  87. /**
  88. * @ORM\Column(type="string", length=190, nullable=false)
  89. */
  90. private $phone;
  91. /**
  92. * @ORM\Column(type="string", length=190, nullable=false)
  93. */
  94. private $firstName;
  95. /**
  96. * @ORM\Column(type="string", length=190, nullable=false)
  97. */
  98. private $lastName;
  99. /**
  100. * @ORM\Column(type="string", length=190, nullable=false)
  101. */
  102. private $email;
  103. /**
  104. * @ORM\Column(type="string", length=190, nullable=false)
  105. */
  106. private $orderEmail;
  107. /**
  108. * @ORM\Column(type="float")
  109. */
  110. private $course;
  111. /**
  112. * @ORM\Column(type="array", nullable=true)
  113. */
  114. private $freeDelivery;
  115. /**
  116. * @ORM\Column(type="array", nullable=true)
  117. */
  118. private $orderFrom;
  119. /**
  120. * @ORM\Column(type="datetime")
  121. */
  122. private $createts;
  123. /**
  124. * @ORM\ManyToOne(targetEntity="App\Entity\User")
  125. * @ORM\JoinColumn(nullable=false)
  126. */
  127. private $createUser;
  128. /**
  129. * @ORM\Column(type="datetime", nullable=true)
  130. */
  131. private $editts;
  132. /**
  133. * @ORM\ManyToOne(targetEntity="App\Entity\User")
  134. */
  135. private $editUser;
  136. /**
  137. * @ORM\OneToMany(targetEntity="App\Entity\OrderItem", mappedBy="dealer", orphanRemoval=false)
  138. */
  139. private $orderItems;
  140. /**
  141. * @ORM\OneToMany(targetEntity="App\Entity\Order", mappedBy="dealer", orphanRemoval=false)
  142. */
  143. private $orders;
  144. /**
  145. * @ORM\ManyToMany(targetEntity="App\Entity\User", mappedBy="dealers")
  146. */
  147. private $users;
  148. /**
  149. * @ORM\OneToMany(targetEntity=ClickAndCollectItem::class, mappedBy="dealer")
  150. */
  151. private $clickAndCollectItems;
  152. /**
  153. * @ORM\OneToMany(targetEntity=LogImport::class, mappedBy="dealer", orphanRemoval=true)
  154. * @ORM\OrderBy({"id"="DESC"})
  155. */
  156. private $logImports;
  157. /**
  158. * @ORM\Column(type="string", length=255, nullable=true)
  159. */
  160. private $urlFeed;
  161. /**
  162. * @ORM\Column(type="string", length=255, nullable=false)
  163. */
  164. private $feedType;
  165. /**
  166. * @ORM\Column(type="datetime", nullable=true)
  167. */
  168. private $lastReloadFeed;
  169. /**
  170. * @ORM\Column(type="boolean")
  171. */
  172. private $reloadFeed = true;
  173. /**
  174. * Odeslat objednávky do jejich systému
  175. *
  176. * @ORM\Column(type="boolean")
  177. */
  178. private $sendExternal = false;
  179. /**
  180. * @ORM\Column(type="array", nullable=true)
  181. */
  182. private $compareCategories;
  183. /**
  184. * @ORM\OneToMany(targetEntity="App\Entity\Product", mappedBy="dealer")
  185. */
  186. private $products;
  187. /**
  188. * @ORM\OneToMany(targetEntity="App\Entity\Application\AppProduct", mappedBy="dealer")
  189. */
  190. private $appProducts;
  191. /**
  192. * @var ArrayCollection $activeBrands
  193. */
  194. private $activeBrands;
  195. /**
  196. * @ORM\OneToMany(targetEntity=DealerBank::class, mappedBy="dealer",cascade={"persist", "remove"}, orphanRemoval=true, indexBy="currency")
  197. */
  198. private $banks;
  199. /**
  200. * @ORM\Column(type="integer", length=3)
  201. */
  202. private $countAppProducts = self::COUNT_APP_PRODUCTS;
  203. /**
  204. * @ORM\OneToMany(targetEntity=Reclamation::class, mappedBy="dealer", orphanRemoval=true)
  205. */
  206. private $reclamations;
  207. public function __construct()
  208. {
  209. $this->orderItems = new ArrayCollection();
  210. $this->orders = new ArrayCollection();
  211. $this->users = new ArrayCollection();
  212. $this->clickAndCollectItems = new ArrayCollection();
  213. $this->logImports = new ArrayCollection();
  214. $this->appProducts = new ArrayCollection();
  215. $this->activeBrands = new ArrayCollection();
  216. $this->banks = new ArrayCollection();
  217. $this->documents = new ArrayCollection();
  218. $this->reclamations = new ArrayCollection();
  219. }
  220. /**
  221. * checkCollections - Nasetování povinných arrayCollections
  222. *
  223. * @param $currencies
  224. * @param $locales
  225. */
  226. public function checkCollections($currencies, $locales){
  227. $diff = array_diff($currencies,array_keys($this->getBanks()->toArray()));
  228. if(count($diff)>0){
  229. foreach ($diff as $curr){
  230. $bank = new DealerBank($curr);
  231. $this->addBank($bank);
  232. }
  233. }
  234. foreach ( $locales as $locale ) {
  235. if($this->getTranslations()->get($locale) === null){
  236. $this->translate($locale)->setPersonalNote(' ');
  237. }
  238. }
  239. $this->mergeNewTranslations();
  240. }
  241. public function __call($method, $arguments)
  242. {
  243. $ret = $this->proxyCurrentLocaleTranslation($method, $arguments);
  244. if(empty($ret)) {
  245. $ret = call_user_func_array( [ $this->translate( \Locale::getDefault() ), $method ], $arguments );
  246. }
  247. return $ret;
  248. }
  249. public function getId(): ?int
  250. {
  251. return $this->id;
  252. }
  253. public function getImage(): ?string
  254. {
  255. return $this->image;
  256. }
  257. public function setImage(?string $image): self
  258. {
  259. $this->image = $image;
  260. return $this;
  261. }
  262. public function getIsActive(): ?bool
  263. {
  264. return $this->isActive;
  265. }
  266. public function setIsActive(bool $isActive): self
  267. {
  268. $this->isActive = $isActive;
  269. return $this;
  270. }
  271. public function getName(): ?string
  272. {
  273. return $this->name;
  274. }
  275. public function setName(string $name): self
  276. {
  277. $this->name = $name;
  278. $this->setSlug(Slugify::create()->slugify($name));
  279. return $this;
  280. }
  281. public function getSlug(): ?string
  282. {
  283. return $this->slug;
  284. }
  285. public function setSlug(string $slug): self
  286. {
  287. $this->slug = $slug;
  288. return $this;
  289. }
  290. public function getCompanyName(): ?string
  291. {
  292. return $this->companyName;
  293. }
  294. public function setCompanyName(?string $companyName): self
  295. {
  296. $this->companyName = $companyName;
  297. return $this;
  298. }
  299. public function getIco(): ?string
  300. {
  301. return $this->ico;
  302. }
  303. public function setIco(?string $ico): self
  304. {
  305. $this->ico = $ico;
  306. return $this;
  307. }
  308. public function getDic(): ?string
  309. {
  310. return $this->dic;
  311. }
  312. public function setDic(?string $dic): self
  313. {
  314. $this->dic = $dic;
  315. return $this;
  316. }
  317. /**
  318. * Get Phone
  319. *
  320. * @return mixed
  321. */
  322. public function getPhone()
  323. {
  324. return $this->phone;
  325. }
  326. /**
  327. * Set Phone
  328. *
  329. * @param mixed $phone
  330. */
  331. public function setPhone( $phone )
  332. {
  333. $this->phone = $phone;
  334. }
  335. public function getStreet(): ?string
  336. {
  337. return $this->street;
  338. }
  339. public function setStreet(?string $street): self
  340. {
  341. $this->street = $street;
  342. return $this;
  343. }
  344. public function getCity(): ?string
  345. {
  346. return $this->city;
  347. }
  348. public function setCity(?string $city): self
  349. {
  350. $this->city = $city;
  351. return $this;
  352. }
  353. public function getZip(): ?string
  354. {
  355. return $this->zip;
  356. }
  357. public function setZip(?string $zip): self
  358. {
  359. $this->zip = $zip;
  360. return $this;
  361. }
  362. public function getStreetNumber(): ?string
  363. {
  364. return $this->streetNumber;
  365. }
  366. public function setStreetNumber(?string $streetNumber): self
  367. {
  368. $this->streetNumber = $streetNumber;
  369. return $this;
  370. }
  371. public function getCreatets(): ?\DateTimeInterface
  372. {
  373. return $this->createts;
  374. }
  375. public function setCreatets(\DateTimeInterface $createts): self
  376. {
  377. $this->createts = $createts;
  378. return $this;
  379. }
  380. public function getCreateUser(): ?User
  381. {
  382. return $this->createUser;
  383. }
  384. public function setCreateUser(?User $createUser): self
  385. {
  386. $this->createUser = $createUser;
  387. return $this;
  388. }
  389. public function getEditts(): ?\DateTimeInterface
  390. {
  391. return $this->editts;
  392. }
  393. public function setEditts(?\DateTimeInterface $editts): self
  394. {
  395. $this->editts = $editts;
  396. return $this;
  397. }
  398. public function getEditUser(): ?User
  399. {
  400. return $this->editUser;
  401. }
  402. public function setEditUser(?User $editUser): self
  403. {
  404. $this->editUser = $editUser;
  405. return $this;
  406. }
  407. /**
  408. * Get Email
  409. *
  410. * @return mixed
  411. */
  412. public function getEmail()
  413. {
  414. return $this->email;
  415. }
  416. /**
  417. * Set Email
  418. *
  419. * @param mixed $email
  420. */
  421. public function setEmail( $email )
  422. {
  423. $this->email = $email;
  424. }
  425. /**
  426. * Get ImageFile
  427. *
  428. * @return null|File
  429. */
  430. public function getImageFile()
  431. {
  432. return $this->imageFile;
  433. }
  434. /**
  435. * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $imageFile
  436. */
  437. public function setImageFile(?File $imageFile = null): void
  438. {
  439. $this->imageFile = $imageFile;
  440. if (null !== $imageFile) {
  441. $this->editts = new \DateTime();
  442. }
  443. }
  444. /**
  445. * @return Collection|OrderItem[]
  446. */
  447. public function getOrderItems(): Collection
  448. {
  449. return $this->orderItems;
  450. }
  451. public function addOrderItem(OrderItem $orderItem): self
  452. {
  453. if (!$this->orderItems->contains($orderItem)) {
  454. $this->orderItems[] = $orderItem;
  455. $orderItem->setOrder($this);
  456. }
  457. return $this;
  458. }
  459. public function removeOrderItem(OrderItem $orderItem): self
  460. {
  461. if ($this->orderItems->contains($orderItem)) {
  462. $this->orderItems->removeElement($orderItem);
  463. // set the owning side to null (unless already changed)
  464. if ($orderItem->getOrder() === $this) {
  465. $orderItem->setOrder(null);
  466. }
  467. }
  468. return $this;
  469. }
  470. /**
  471. * @return Collection|Order[]
  472. */
  473. public function getOrders(): Collection
  474. {
  475. return $this->orders;
  476. }
  477. public function addOrder(Order $order): self
  478. {
  479. if (!$this->orders->contains($order)) {
  480. $this->orders[] = $order;
  481. $order->setDealer($this);
  482. }
  483. return $this;
  484. }
  485. public function removeOrder(Order $order): self
  486. {
  487. if ($this->orders->contains($order)) {
  488. $this->orders->removeElement($order);
  489. // set the owning side to null (unless already changed)
  490. if ($order->getDealer() === $this) {
  491. $order->setDealer(null);
  492. }
  493. }
  494. return $this;
  495. }
  496. /**
  497. * @return Collection|User[]
  498. */
  499. public function getUsers(): Collection
  500. {
  501. return $this->users;
  502. }
  503. public function addUser(User $user): self
  504. {
  505. if (!$this->users->contains($user)) {
  506. $this->users[] = $user;
  507. }
  508. return $this;
  509. }
  510. public function removeUser(User $user): self
  511. {
  512. if ($this->users->contains($user)) {
  513. $this->users->removeElement($user);
  514. }
  515. return $this;
  516. }
  517. /**
  518. * Get Course
  519. *
  520. * @return mixed
  521. */
  522. public function getCourse()
  523. {
  524. return $this->course;
  525. }
  526. /**
  527. * Set Course
  528. *
  529. * @param mixed $course
  530. */
  531. public function setCourse( $course )
  532. {
  533. $this->course = $course;
  534. }
  535. /**
  536. * @return Collection|ClickAndCollectItem[]
  537. */
  538. public function getClickAndCollectItems(): Collection
  539. {
  540. return $this->clickAndCollectItems;
  541. }
  542. public function addClickAndCollectItem(ClickAndCollectItem $clickAndCollectItem): self
  543. {
  544. if (!$this->clickAndCollectItems->contains($clickAndCollectItem)) {
  545. $this->clickAndCollectItems[] = $clickAndCollectItem;
  546. $clickAndCollectItem->setDealer($this);
  547. }
  548. return $this;
  549. }
  550. public function removeClickAndCollectItem(ClickAndCollectItem $clickAndCollectItem): self
  551. {
  552. if ($this->clickAndCollectItems->contains($clickAndCollectItem)) {
  553. $this->clickAndCollectItems->removeElement($clickAndCollectItem);
  554. // set the owning side to null (unless already changed)
  555. if ($clickAndCollectItem->getDealer() === $this) {
  556. $clickAndCollectItem->setDealer(null);
  557. }
  558. }
  559. return $this;
  560. }
  561. /**
  562. * @return Collection|LogImport[]
  563. */
  564. public function getLogImports(): Collection
  565. {
  566. return $this->logImports;
  567. }
  568. public function addLogImport(LogImport $logImport): self
  569. {
  570. if (!$this->logImports->contains($logImport)) {
  571. $this->logImports[] = $logImport;
  572. $logImport->setDealer($this);
  573. }
  574. return $this;
  575. }
  576. public function removeLogImport(LogImport $logImport): self
  577. {
  578. if ($this->logImports->contains($logImport)) {
  579. $this->logImports->removeElement($logImport);
  580. // set the owning side to null (unless already changed)
  581. if ($logImport->getDealer() === $this) {
  582. $logImport->setDealer(null);
  583. }
  584. }
  585. return $this;
  586. }
  587. /**
  588. * Get UrlFeed
  589. *
  590. * @return mixed
  591. */
  592. public function getUrlFeed()
  593. {
  594. return $this->urlFeed;
  595. }
  596. /**
  597. * Set UrlFeed
  598. *
  599. * @param mixed $urlFeed
  600. */
  601. public function setUrlFeed( $urlFeed )
  602. {
  603. $this->urlFeed = $urlFeed;
  604. }
  605. /**
  606. * Get CompareCategories
  607. *
  608. * @return mixed
  609. */
  610. public function getCompareCategories()
  611. {
  612. return $this->compareCategories;
  613. }
  614. /**
  615. * Set CompareCategories
  616. *
  617. * @param mixed $compareCategories
  618. */
  619. public function setCompareCategories( $compareCategories )
  620. {
  621. $this->compareCategories = $compareCategories;
  622. }
  623. /**
  624. * Get OrderEmail
  625. *
  626. * @return mixed
  627. */
  628. public function getOrderEmail()
  629. {
  630. return $this->orderEmail;
  631. }
  632. /**
  633. * Set OrderEmail
  634. *
  635. * @param mixed $orderEmail
  636. */
  637. public function setOrderEmail( $orderEmail )
  638. {
  639. $this->orderEmail = $orderEmail;
  640. }
  641. /**
  642. * Get FreeDelivery
  643. *
  644. * @return mixed
  645. */
  646. public function getFreeDelivery()
  647. {
  648. return $this->freeDelivery;
  649. }
  650. /**
  651. * Set FreeDelivery
  652. *
  653. * @param mixed $freeDelivery
  654. */
  655. public function setFreeDelivery( $freeDelivery )
  656. {
  657. $this->freeDelivery = $freeDelivery;
  658. }
  659. /**
  660. * Get Products
  661. *
  662. * @return mixed
  663. */
  664. public function getProducts()
  665. {
  666. return $this->products;
  667. }
  668. /**
  669. * Set Products
  670. *
  671. * @param mixed $products
  672. */
  673. public function setProducts( $products )
  674. {
  675. $this->products = $products;
  676. }
  677. public function getActiveBrands(): ?Collection
  678. {
  679. return $this->activeBrands;
  680. }
  681. public function addActiveBrand(Brand $brand): self
  682. {
  683. if($this->activeBrands === null){
  684. $this->activeBrands = new ArrayCollection();
  685. }
  686. if (!$this->activeBrands->contains($brand)) {
  687. $this->activeBrands[] = $brand;
  688. }
  689. return $this;
  690. }
  691. /**
  692. * Get FeedType
  693. *
  694. * @return mixed
  695. */
  696. public function getFeedType()
  697. {
  698. return $this->feedType;
  699. }
  700. /**
  701. * Set FeedType
  702. *
  703. * @param mixed $feedType
  704. */
  705. public function setFeedType( $feedType )
  706. {
  707. $this->feedType = $feedType;
  708. }
  709. /**
  710. * @return Collection|DealerBank[]
  711. */
  712. public function getBanks(): Collection
  713. {
  714. return $this->banks;
  715. }
  716. public function addBank(DealerBank $bank): self
  717. {
  718. if (!$this->banks->contains($bank)) {
  719. $this->banks[] = $bank;
  720. $bank->setDealer($this);
  721. }
  722. return $this;
  723. }
  724. public function removeBank(DealerBank $bank): self
  725. {
  726. if ($this->banks->removeElement($bank)) {
  727. // set the owning side to null (unless already changed)
  728. if ($bank->getDealer() === $this) {
  729. $bank->setDealer(null);
  730. }
  731. }
  732. return $this;
  733. }
  734. /**
  735. * Get FirstName
  736. *
  737. * @return mixed
  738. */
  739. public function getFirstName()
  740. {
  741. return $this->firstName;
  742. }
  743. /**
  744. * Set FirstName
  745. *
  746. * @param mixed $firstName
  747. */
  748. public function setFirstName( $firstName )
  749. {
  750. $this->firstName = $firstName;
  751. }
  752. /**
  753. * Get LastName
  754. *
  755. * @return mixed
  756. */
  757. public function getLastName()
  758. {
  759. return $this->lastName;
  760. }
  761. /**
  762. * Set LastName
  763. *
  764. * @param mixed $lastName
  765. */
  766. public function setLastName( $lastName )
  767. {
  768. $this->lastName = $lastName;
  769. }
  770. public function getFullName()
  771. {
  772. return sprintf('%s %s',$this->lastName,$this->firstName);
  773. }
  774. /**
  775. * Get LastReloadFeed
  776. *
  777. * @return mixed
  778. */
  779. public function getLastReloadFeed()
  780. {
  781. return $this->lastReloadFeed;
  782. }
  783. /**
  784. * Set LastReloadFeed
  785. *
  786. * @param mixed $lastReloadFeed
  787. */
  788. public function setLastReloadFeed( $lastReloadFeed )
  789. {
  790. $this->lastReloadFeed = $lastReloadFeed;
  791. }
  792. /**
  793. * Get ReloadFeed
  794. *
  795. * @return mixed
  796. */
  797. public function getReloadFeed()
  798. {
  799. return $this->reloadFeed;
  800. }
  801. /**
  802. * Set ReloadFeed
  803. *
  804. * @param mixed $reloadFeed
  805. */
  806. public function setReloadFeed( $reloadFeed )
  807. {
  808. $this->reloadFeed = $reloadFeed;
  809. }
  810. /**
  811. * Get SendExternal
  812. *
  813. * @return mixed
  814. */
  815. public function getSendExternal()
  816. {
  817. return $this->sendExternal;
  818. }
  819. /**
  820. * Set SendExternal
  821. *
  822. * @param mixed $sendExternal
  823. */
  824. public function setSendExternal( $sendExternal )
  825. {
  826. $this->sendExternal = $sendExternal;
  827. }
  828. /**
  829. * Get CountAppProducts
  830. *
  831. * @return mixed
  832. */
  833. public function getCountAppProducts()
  834. {
  835. return $this->countAppProducts;
  836. }
  837. /**
  838. * Set CountAppProducts
  839. *
  840. * @param mixed $countAppProducts
  841. */
  842. public function setCountAppProducts( $countAppProducts )
  843. {
  844. $this->countAppProducts = $countAppProducts;
  845. }
  846. /**
  847. * Get Products
  848. *
  849. * @return mixed
  850. */
  851. public function getAppProducts()
  852. {
  853. return $this->appProducts;
  854. }
  855. /**
  856. * Set AppProducts
  857. *
  858. * @param mixed $appProducts
  859. */
  860. public function setAppProducts( $appProducts )
  861. {
  862. $this->appProducts = $appProducts;
  863. }
  864. /**
  865. * @return Collection|Reclamation[]
  866. */
  867. public function getReclamations(): Collection
  868. {
  869. return $this->reclamations;
  870. }
  871. public function addReclamation(Reclamation $reclamation): self
  872. {
  873. if (!$this->reclamations->contains($reclamation)) {
  874. $this->reclamations[] = $reclamation;
  875. $reclamation->setDealer($this);
  876. }
  877. return $this;
  878. }
  879. public function removeReclamation(Reclamation $reclamation): self
  880. {
  881. if ($this->reclamations->removeElement($reclamation)) {
  882. // set the owning side to null (unless already changed)
  883. if ($reclamation->getDealer() === $this) {
  884. $reclamation->setDealer(null);
  885. }
  886. }
  887. return $this;
  888. }
  889. /**
  890. * @return mixed
  891. */
  892. public function getCode()
  893. {
  894. return $this->code;
  895. }
  896. /**
  897. * @param mixed $code
  898. */
  899. public function setCode($code): void
  900. {
  901. $this->code = $code;
  902. }
  903. /**
  904. * @return mixed
  905. */
  906. public function getOrderFrom()
  907. {
  908. return $this->orderFrom;
  909. }
  910. /**
  911. * @param mixed $orderFrom
  912. */
  913. public function setOrderFrom($orderFrom): void
  914. {
  915. $this->orderFrom = $orderFrom;
  916. }
  917. }