src/Entity/Distributors.php line 176

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DistributorsRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClass: DistributorsRepository::class)]
  8. class Distributors
  9. {
  10. #[ORM\Id]
  11. #[ORM\GeneratedValue]
  12. #[ORM\Column(type: 'integer')]
  13. private $id;
  14. #[ORM\Column(type: 'string', length: 255)]
  15. private $distributorName;
  16. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  17. private $logo;
  18. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  19. private $telephone;
  20. #[ORM\Column(type: 'string', length: 255)]
  21. private $email;
  22. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  23. private $website;
  24. #[ORM\Column(type: 'text', nullable: true)]
  25. private $about;
  26. #[ORM\Column(type: 'text', nullable: true)]
  27. private $operatingHours;
  28. #[ORM\Column(type: 'text', nullable: true)]
  29. private $refundPolicy;
  30. #[ORM\Column(type: 'text', nullable: true)]
  31. private $salesTaxPolicy;
  32. #[ORM\Column(type: 'boolean', nullable: true)]
  33. private $isManufaturer;
  34. #[ORM\Column(type: 'integer', nullable: true)]
  35. private $themeId;
  36. #[ORM\Column(type: 'datetime')]
  37. private $modified;
  38. #[ORM\Column(type: 'datetime')]
  39. private $created;
  40. #[ORM\OneToMany(targetEntity: DistributorClinicPrices::class, mappedBy: 'distributor')]
  41. private $distributorClinicPrices;
  42. #[ORM\OneToMany(targetEntity: DistributorProducts::class, mappedBy: 'distributor')]
  43. private $distributorProducts;
  44. #[ORM\OneToMany(targetEntity: DistributorUsers::class, mappedBy: 'distributor')]
  45. private $distributorUsers;
  46. #[ORM\OneToMany(targetEntity: EventLog::class, mappedBy: 'distributor')]
  47. private $eventLogs;
  48. #[ORM\OneToMany(targetEntity: OrderItems::class, mappedBy: 'distributor')]
  49. private $orderItems;
  50. #[ORM\OneToMany(targetEntity: ListItems::class, mappedBy: 'distributor')]
  51. private $listItems;
  52. #[ORM\OneToMany(targetEntity: BasketItems::class, mappedBy: 'distributor')]
  53. private $basketItems;
  54. #[ORM\OneToMany(targetEntity: ClinicProducts::class, mappedBy: 'distributor')]
  55. private $clinicProducts;
  56. #[ORM\OneToMany(targetEntity: AvailabilityTracker::class, mappedBy: 'distributor')]
  57. private $availabilityTrackers;
  58. #[ORM\Column(type: 'string', length: 10, nullable: true)]
  59. private $poNumberPrefix;
  60. #[ORM\OneToMany(targetEntity: ChatParticipants::class, mappedBy: 'distributor')]
  61. private $chatParticipants;
  62. #[ORM\OneToMany(targetEntity: ChatMessages::class, mappedBy: 'distributor')]
  63. private $chatMessages;
  64. #[ORM\OneToMany(targetEntity: Notifications::class, mappedBy: 'distributor')]
  65. private $notifications;
  66. #[ORM\OneToMany(targetEntity: OrderStatus::class, mappedBy: 'distributor')]
  67. private $orderStatuses;
  68. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  69. private $addressStreet;
  70. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  71. private $addressCity;
  72. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  73. private $addressPostalCode;
  74. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  75. private $addressState;
  76. #[ORM\ManyToOne(targetEntity: Countries::class, inversedBy: 'distributors')]
  77. private $addressCountry;
  78. #[ORM\Column(type: 'text', nullable: true)]
  79. private $shippingPolicy;
  80. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  81. private $isoCode;
  82. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  83. private $intlCode;
  84. #[ORM\OneToMany(targetEntity: DistributorUserPermissions::class, mappedBy: 'distributor')]
  85. private $distributorUserPermissions;
  86. #[ORM\OneToOne(targetEntity: ApiDetails::class, mappedBy: 'distributor', cascade: ['persist', 'remove'])]
  87. private $api;
  88. #[ORM\OneToMany(targetEntity: DistributorClinics::class, mappedBy: 'distributor')]
  89. private $distributorClinics;
  90. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  91. private $hashedEmail;
  92. #[ORM\ManyToOne(targetEntity: Tracking::class, inversedBy: 'distributors')]
  93. #[ORM\JoinColumn(nullable: false)]
  94. private $tracking;
  95. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  96. private $domainName;
  97. #[ORM\Column(type: 'integer', nullable: true)]
  98. private $isApproved;
  99. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  100. private $managerFirstName;
  101. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  102. private $managerLastName;
  103. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  104. private $tradeLicense;
  105. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  106. private $tradeLicenseNo;
  107. #[ORM\Column(type: 'date', nullable: true)]
  108. private $tradeLicenseExpDate;
  109. #[ORM\Column(type: 'string', length: 255, nullable: true)]
  110. private $managerIdNo;
  111. #[ORM\Column(type: 'date', nullable: true)]
  112. private $managerIdExpDate;
  113. #[ORM\OneToMany(targetEntity: ControlledDrugFiles::class, mappedBy: 'distributor')]
  114. private $controlledDrugFiles;
  115. /**
  116. * @var Collection<int, CustomPriceLists>
  117. */
  118. #[ORM\OneToMany(mappedBy: 'distributor', targetEntity: CustomPriceLists::class)]
  119. private Collection $customPriceLists;
  120. #[ORM\OneToOne(mappedBy: 'distributor', cascade: ['persist', 'remove'])]
  121. private ?ScraperAunthentication $scraperAunthentication = null;
  122. /**
  123. * @var Collection<int, ScraperUrls>
  124. */
  125. #[ORM\OneToMany(mappedBy: 'distributor', targetEntity: ScraperUrls::class)]
  126. private Collection $scraperUrls;
  127. /**
  128. * @var Collection<int, ClinicDistributorContacts>
  129. */
  130. #[ORM\OneToMany(mappedBy: 'distributor', targetEntity: ClinicDistributorContacts::class)]
  131. private Collection $clinicDistributorContacts;
  132. /**
  133. * @var Collection<int, ScraperLog>
  134. */
  135. #[ORM\OneToMany(mappedBy: 'distributor', targetEntity: ScraperLog::class)]
  136. private Collection $scraperLogs;
  137. /**
  138. * @var Collection<int, ScraperProducts>
  139. */
  140. #[ORM\OneToMany(mappedBy: 'distributor', targetEntity: ScraperProducts::class)]
  141. private Collection $scraperProducts;
  142. /**
  143. * @var Collection<int, AiDistributorProducts>
  144. */
  145. #[ORM\OneToMany(mappedBy: 'distributor', targetEntity: AiDistributorProducts::class)]
  146. private Collection $aiDistributorProducts;
  147. /**
  148. * @var Collection<int, AiListItems>
  149. */
  150. #[ORM\OneToMany(mappedBy: 'distributor', targetEntity: AiListItems::class)]
  151. private Collection $aiListItems;
  152. /**
  153. * @var Collection<int, AiBasketItems>
  154. */
  155. #[ORM\OneToMany(mappedBy: 'distributor', targetEntity: AiBasketItems::class)]
  156. private Collection $aiBasketItems;
  157. /**
  158. * @var Collection<int, AiOrderItems>
  159. */
  160. #[ORM\OneToMany(mappedBy: 'distributor', targetEntity: AiOrderItems::class)]
  161. private Collection $aiOrderItems;
  162. /**
  163. * @var Collection<int, AiClinicProducts>
  164. */
  165. #[ORM\OneToMany(mappedBy: 'distributor', targetEntity: AiClinicProducts::class)]
  166. private Collection $aiClinicProducts;
  167. /**
  168. * @var Collection<int, AiCustomPriceLists>
  169. */
  170. #[ORM\OneToMany(mappedBy: 'distributor', targetEntity: AiCustomPriceLists::class)]
  171. private Collection $aiCustomPriceLists;
  172. /**
  173. * @var Collection<int, AiControlledDrugFiles>
  174. */
  175. #[ORM\OneToMany(mappedBy: 'distributor', targetEntity: AiControlledDrugFiles::class)]
  176. private Collection $aiControlledDrugFiles;
  177. /**
  178. * @var Collection<int, AiOrderStatus>
  179. */
  180. #[ORM\OneToMany(mappedBy: 'distributor', targetEntity: AiOrderStatus::class)]
  181. private Collection $aiOrderStatuses;
  182. #[ORM\Column]
  183. private ?bool $hasScraper = null;
  184. #[ORM\Column(length: 255, nullable: true)]
  185. private ?string $name = null;
  186. public function __construct()
  187. {
  188. $date = new \DateTime("now", new \DateTimeZone('Asia/Dubai'));
  189. $this->setModified($date);
  190. if ($this->getCreated() == null)
  191. {
  192. $this->setCreated($date);
  193. }
  194. $this->distributors = new ArrayCollection();
  195. $this->distributorClinicPrices = new ArrayCollection();
  196. $this->distributorProducts = new ArrayCollection();
  197. $this->distributorUsers = new ArrayCollection();
  198. $this->eventLogs = new ArrayCollection();
  199. $this->orderItems = new ArrayCollection();
  200. $this->listItems = new ArrayCollection();
  201. $this->basketItems = new ArrayCollection();
  202. $this->clinicProducts = new ArrayCollection();
  203. $this->availabilityTrackers = new ArrayCollection();
  204. $this->chatParticipants = new ArrayCollection();
  205. $this->chatMessages = new ArrayCollection();
  206. $this->notifications = new ArrayCollection();
  207. $this->orderStatuses = new ArrayCollection();
  208. $this->distributorUserPermissions = new ArrayCollection();
  209. $this->refreshTokens = new ArrayCollection();
  210. $this->distributorClinics = new ArrayCollection();
  211. $this->controlledDrugFiles = new ArrayCollection();
  212. $this->customPriceLists = new ArrayCollection();
  213. $this->scraperUrls = new ArrayCollection();
  214. $this->clinicDistributorContacts = new ArrayCollection();
  215. $this->scraperLogs = new ArrayCollection();
  216. $this->scraperImages = new ArrayCollection();
  217. $this->scraperProducts = new ArrayCollection();
  218. $this->aiDistributorProducts = new ArrayCollection();
  219. $this->aiListItems = new ArrayCollection();
  220. $this->aiBasketItems = new ArrayCollection();
  221. $this->aiOrderItems = new ArrayCollection();
  222. $this->aiClinicProducts = new ArrayCollection();
  223. $this->aiCustomPriceLists = new ArrayCollection();
  224. $this->aiControlledDrugFiles = new ArrayCollection();
  225. $this->aiOrderStatuses = new ArrayCollection();
  226. }
  227. public function getId(): ?int
  228. {
  229. return $this->id;
  230. }
  231. public function getDistributorName(): ?string
  232. {
  233. return $this->distributorName;
  234. }
  235. public function setDistributorName(string $distributorName): self
  236. {
  237. $this->distributorName = $distributorName;
  238. return $this;
  239. }
  240. public function getLogo(): ?string
  241. {
  242. return $this->logo;
  243. }
  244. public function setLogo(string $logo): self
  245. {
  246. $this->logo = $logo;
  247. return $this;
  248. }
  249. public function getEmail(): ?string
  250. {
  251. return $this->email;
  252. }
  253. public function setEmail(string $email): self
  254. {
  255. $this->email = $email;
  256. return $this;
  257. }
  258. public function getTelephone(): ?string
  259. {
  260. return $this->telephone;
  261. }
  262. public function setTelephone(string $telephone): self
  263. {
  264. $this->telephone = $telephone;
  265. return $this;
  266. }
  267. public function getWebsite(): ?string
  268. {
  269. return $this->website;
  270. }
  271. public function setWebsite(string $website): self
  272. {
  273. $this->website = $website;
  274. return $this;
  275. }
  276. public function getAbout(): ?string
  277. {
  278. return $this->about;
  279. }
  280. public function setAbout(?string $about): self
  281. {
  282. $this->about = $about;
  283. return $this;
  284. }
  285. public function getOperatingHours(): ?string
  286. {
  287. return $this->operatingHours;
  288. }
  289. public function setOperatingHours(string $operatingHours): self
  290. {
  291. $this->operatingHours = $operatingHours;
  292. return $this;
  293. }
  294. public function getRefundPolicy(): ?string
  295. {
  296. return $this->refundPolicy;
  297. }
  298. public function setRefundPolicy(string $refundPolicy): self
  299. {
  300. $this->refundPolicy = $refundPolicy;
  301. return $this;
  302. }
  303. public function getSalesTaxPolicy(): ?string
  304. {
  305. return $this->salesTaxPolicy;
  306. }
  307. public function setSalesTaxPolicy(string $salesTaxPolicy): self
  308. {
  309. $this->salesTaxPolicy = $salesTaxPolicy;
  310. return $this;
  311. }
  312. public function getIsManufaturer(): ?bool
  313. {
  314. return $this->isManufaturer;
  315. }
  316. public function setIsManufaturer(bool $isManufaturer): self
  317. {
  318. $this->isManufaturer = $isManufaturer;
  319. return $this;
  320. }
  321. public function getThemeId(): ?int
  322. {
  323. return $this->themeId;
  324. }
  325. public function setThemeId(?int $themeId): self
  326. {
  327. $this->themeId = $themeId;
  328. return $this;
  329. }
  330. public function getModified(): ?\DateTimeInterface
  331. {
  332. return $this->modified;
  333. }
  334. public function setModified(\DateTimeInterface $modified): self
  335. {
  336. $this->modified = $modified;
  337. return $this;
  338. }
  339. public function getCreated(): ?\DateTimeInterface
  340. {
  341. return $this->created;
  342. }
  343. public function setCreated(\DateTimeInterface $created): self
  344. {
  345. $this->created = $created;
  346. return $this;
  347. }
  348. /**
  349. * @return Collection|DistributorClinicPrices[]
  350. */
  351. public function getDistributorClinicPrices(): Collection
  352. {
  353. return $this->distributorClinicPrices;
  354. }
  355. public function addDistributorClinicPrice(DistributorClinicPrices $distributorClinicPrice): self
  356. {
  357. if (!$this->distributorClinicPrices->contains($distributorClinicPrice)) {
  358. $this->distributorClinicPrices[] = $distributorClinicPrice;
  359. $distributorClinicPrice->setDistributor($this);
  360. }
  361. return $this;
  362. }
  363. public function removeDistributorClinicPrice(DistributorClinicPrices $distributorClinicPrice): self
  364. {
  365. if ($this->distributorClinicPrices->removeElement($distributorClinicPrice)) {
  366. // set the owning side to null (unless already changed)
  367. if ($distributorClinicPrice->getDistributor() === $this) {
  368. $distributorClinicPrice->setDistributor(null);
  369. }
  370. }
  371. return $this;
  372. }
  373. /**
  374. * @return Collection|DistributorProducts[]
  375. */
  376. public function getDistributorProducts(): Collection
  377. {
  378. return $this->distributorProducts;
  379. }
  380. public function addDistributorProduct(DistributorProducts $distributorProduct): self
  381. {
  382. if (!$this->distributorProducts->contains($distributorProduct)) {
  383. $this->distributorProducts[] = $distributorProduct;
  384. $distributorProduct->setDistributor($this);
  385. }
  386. return $this;
  387. }
  388. public function removeDistributorProduct(DistributorProducts $distributorProduct): self
  389. {
  390. if ($this->distributorProducts->removeElement($distributorProduct)) {
  391. // set the owning side to null (unless already changed)
  392. if ($distributorProduct->getDistributor() === $this) {
  393. $distributorProduct->setDistributor(null);
  394. }
  395. }
  396. return $this;
  397. }
  398. /**
  399. * @return Collection|DistributorUsers[]
  400. */
  401. public function getDistributorUsers(): Collection
  402. {
  403. return $this->distributorUsers;
  404. }
  405. public function addDistributorUser(DistributorUsers $distributorUser): self
  406. {
  407. if (!$this->distributorUsers->contains($distributorUser)) {
  408. $this->distributorUsers[] = $distributorUser;
  409. $distributorUser->setDistributor($this);
  410. }
  411. return $this;
  412. }
  413. public function removeDistributorUser(DistributorUsers $distributorUser): self
  414. {
  415. if ($this->distributorUsers->removeElement($distributorUser)) {
  416. // set the owning side to null (unless already changed)
  417. if ($distributorUser->getDistributor() === $this) {
  418. $distributorUser->setDistributor(null);
  419. }
  420. }
  421. return $this;
  422. }
  423. /**
  424. * @return Collection|EventLog[]
  425. */
  426. public function getEventLogs(): Collection
  427. {
  428. return $this->eventLogs;
  429. }
  430. public function addEventLog(EventLog $eventLog): self
  431. {
  432. if (!$this->eventLogs->contains($eventLog)) {
  433. $this->eventLogs[] = $eventLog;
  434. $eventLog->setDistributor($this);
  435. }
  436. return $this;
  437. }
  438. public function removeEventLog(EventLog $eventLog): self
  439. {
  440. if ($this->eventLogs->removeElement($eventLog)) {
  441. // set the owning side to null (unless already changed)
  442. if ($eventLog->getDistributor() === $this) {
  443. $eventLog->setDistributor(null);
  444. }
  445. }
  446. return $this;
  447. }
  448. /**
  449. * @return Collection|OrderItems[]
  450. */
  451. public function getOrderItems(): Collection
  452. {
  453. return $this->orderItems;
  454. }
  455. public function addOrderItem(OrderItems $orderItem): self
  456. {
  457. if (!$this->orderItems->contains($orderItem)) {
  458. $this->orderItems[] = $orderItem;
  459. $orderItem->setDistributor($this);
  460. }
  461. return $this;
  462. }
  463. public function removeOrderItem(OrderItems $orderItem): self
  464. {
  465. if ($this->orderItems->removeElement($orderItem)) {
  466. // set the owning side to null (unless already changed)
  467. if ($orderItem->getDistributor() === $this) {
  468. $orderItem->setDistributor(null);
  469. }
  470. }
  471. return $this;
  472. }
  473. /**
  474. * @return Collection<int, ListItems>
  475. */
  476. public function getListItems(): Collection
  477. {
  478. return $this->listItems;
  479. }
  480. public function addListItem(ListItems $listItem): self
  481. {
  482. if (!$this->listItems->contains($listItem)) {
  483. $this->listItems[] = $listItem;
  484. $listItem->setDistributor($this);
  485. }
  486. return $this;
  487. }
  488. public function removeListItem(ListItems $listItem): self
  489. {
  490. if ($this->listItems->removeElement($listItem)) {
  491. // set the owning side to null (unless already changed)
  492. if ($listItem->getDistributor() === $this) {
  493. $listItem->setDistributor(null);
  494. }
  495. }
  496. return $this;
  497. }
  498. /**
  499. * @return Collection<int, BasketItems>
  500. */
  501. public function getBasketItems(): Collection
  502. {
  503. return $this->basketItems;
  504. }
  505. public function addBasketItem(BasketItems $basketItem): self
  506. {
  507. if (!$this->basketItems->contains($basketItem)) {
  508. $this->basketItems[] = $basketItem;
  509. $basketItem->setDistributor($this);
  510. }
  511. return $this;
  512. }
  513. public function removeBasketItem(BasketItems $basketItem): self
  514. {
  515. if ($this->basketItems->removeElement($basketItem)) {
  516. // set the owning side to null (unless already changed)
  517. if ($basketItem->getDistributor() === $this) {
  518. $basketItem->setDistributor(null);
  519. }
  520. }
  521. return $this;
  522. }
  523. /**
  524. * @return Collection<int, ClinicProducts>
  525. */
  526. public function getClinicProducts(): Collection
  527. {
  528. return $this->clinicProducts;
  529. }
  530. public function addClinicProduct(ClinicProducts $clinicProduct): self
  531. {
  532. if (!$this->clinicProducts->contains($clinicProduct)) {
  533. $this->clinicProducts[] = $clinicProduct;
  534. $clinicProduct->setDistributor($this);
  535. }
  536. return $this;
  537. }
  538. public function removeClinicProduct(ClinicProducts $clinicProduct): self
  539. {
  540. if ($this->clinicProducts->removeElement($clinicProduct)) {
  541. // set the owning side to null (unless already changed)
  542. if ($clinicProduct->getDistributor() === $this) {
  543. $clinicProduct->setDistributor(null);
  544. }
  545. }
  546. return $this;
  547. }
  548. /**
  549. * @return Collection<int, AvailabilityTracker>
  550. */
  551. public function getAvailabilityTrackers(): Collection
  552. {
  553. return $this->availabilityTrackers;
  554. }
  555. public function addAvailabilityTracker(AvailabilityTracker $availabilityTracker): self
  556. {
  557. if (!$this->availabilityTrackers->contains($availabilityTracker)) {
  558. $this->availabilityTrackers[] = $availabilityTracker;
  559. $availabilityTracker->setDistributor($this);
  560. }
  561. return $this;
  562. }
  563. public function removeAvailabilityTracker(AvailabilityTracker $availabilityTracker): self
  564. {
  565. if ($this->availabilityTrackers->removeElement($availabilityTracker)) {
  566. // set the owning side to null (unless already changed)
  567. if ($availabilityTracker->getDistributor() === $this) {
  568. $availabilityTracker->setDistributor(null);
  569. }
  570. }
  571. return $this;
  572. }
  573. public function getPoNumberPrefix(): ?string
  574. {
  575. return $this->poNumberPrefix;
  576. }
  577. public function setPoNumberPrefix(?string $poNumberPrefix): self
  578. {
  579. $this->poNumberPrefix = $poNumberPrefix;
  580. return $this;
  581. }
  582. /**
  583. * @return Collection<int, ChatParticipants>
  584. */
  585. public function getChatParticipants(): Collection
  586. {
  587. return $this->chatParticipants;
  588. }
  589. public function addChatParticipant(ChatParticipants $chatParticipant): self
  590. {
  591. if (!$this->chatParticipants->contains($chatParticipant)) {
  592. $this->chatParticipants[] = $chatParticipant;
  593. $chatParticipant->setDistributor($this);
  594. }
  595. return $this;
  596. }
  597. public function removeChatParticipant(ChatParticipants $chatParticipant): self
  598. {
  599. if ($this->chatParticipants->removeElement($chatParticipant)) {
  600. // set the owning side to null (unless already changed)
  601. if ($chatParticipant->getDistributor() === $this) {
  602. $chatParticipant->setDistributor(null);
  603. }
  604. }
  605. return $this;
  606. }
  607. /**
  608. * @return Collection<int, ChatMessages>
  609. */
  610. public function getChatMessages(): Collection
  611. {
  612. return $this->chatMessages;
  613. }
  614. public function addChatMessage(ChatMessages $chatMessage): self
  615. {
  616. if (!$this->chatMessages->contains($chatMessage)) {
  617. $this->chatMessages[] = $chatMessage;
  618. $chatMessage->setDistributor($this);
  619. }
  620. return $this;
  621. }
  622. public function removeChatMessage(ChatMessages $chatMessage): self
  623. {
  624. if ($this->chatMessages->removeElement($chatMessage)) {
  625. // set the owning side to null (unless already changed)
  626. if ($chatMessage->getDistributor() === $this) {
  627. $chatMessage->setDistributor(null);
  628. }
  629. }
  630. return $this;
  631. }
  632. /**
  633. * @return Collection<int, Notifications>
  634. */
  635. public function getNotifications(): Collection
  636. {
  637. return $this->notifications;
  638. }
  639. public function addNotification(Notifications $notification): self
  640. {
  641. if (!$this->notifications->contains($notification)) {
  642. $this->notifications[] = $notification;
  643. $notification->setDistributors($this);
  644. }
  645. return $this;
  646. }
  647. public function removeNotification(Notifications $notification): self
  648. {
  649. if ($this->notifications->removeElement($notification)) {
  650. // set the owning side to null (unless already changed)
  651. if ($notification->getDistributors() === $this) {
  652. $notification->setDistributors(null);
  653. }
  654. }
  655. return $this;
  656. }
  657. /**
  658. * @return Collection<int, OrderStatus>
  659. */
  660. public function getOrderStatuses(): Collection
  661. {
  662. return $this->orderStatuses;
  663. }
  664. public function addOrderStatus(OrderStatus $orderStatus): self
  665. {
  666. if (!$this->orderStatuses->contains($orderStatus)) {
  667. $this->orderStatuses[] = $orderStatus;
  668. $orderStatus->setDistributor($this);
  669. }
  670. return $this;
  671. }
  672. public function removeOrderStatus(OrderStatus $orderStatus): self
  673. {
  674. if ($this->orderStatuses->removeElement($orderStatus)) {
  675. // set the owning side to null (unless already changed)
  676. if ($orderStatus->getDistributor() === $this) {
  677. $orderStatus->setDistributor(null);
  678. }
  679. }
  680. return $this;
  681. }
  682. public function getAddressStreet(): ?string
  683. {
  684. return $this->addressStreet;
  685. }
  686. public function setAddressStreet(?string $addressStreet): self
  687. {
  688. $this->addressStreet = $addressStreet;
  689. return $this;
  690. }
  691. public function getAddressCity(): ?string
  692. {
  693. return $this->addressCity;
  694. }
  695. public function setAddressCity(?string $addressCity): self
  696. {
  697. $this->addressCity = $addressCity;
  698. return $this;
  699. }
  700. public function getAddressPostalCode(): ?string
  701. {
  702. return $this->addressPostalCode;
  703. }
  704. public function setAddressPostalCode(?string $addressPostalCode): self
  705. {
  706. $this->addressPostalCode = $addressPostalCode;
  707. return $this;
  708. }
  709. public function getAddressState(): ?string
  710. {
  711. return $this->addressState;
  712. }
  713. public function setAddressState(?string $addressState): self
  714. {
  715. $this->addressState = $addressState;
  716. return $this;
  717. }
  718. public function getAddressCountry(): ?Countries
  719. {
  720. return $this->addressCountry;
  721. }
  722. public function setAddressCountry(?Countries $addressCountry): self
  723. {
  724. $this->addressCountry = $addressCountry;
  725. return $this;
  726. }
  727. public function getShippingPolicy(): ?string
  728. {
  729. return $this->shippingPolicy;
  730. }
  731. public function setShippingPolicy(?string $shippingPolicy): self
  732. {
  733. $this->shippingPolicy = $shippingPolicy;
  734. return $this;
  735. }
  736. public function getIsoCode(): ?string
  737. {
  738. return $this->isoCode;
  739. }
  740. public function setIsoCode(?string $isoCode): self
  741. {
  742. $this->isoCode = $isoCode;
  743. return $this;
  744. }
  745. public function getIntlCode(): ?string
  746. {
  747. return $this->intlCode;
  748. }
  749. public function setIntlCode(?string $intlCode): self
  750. {
  751. $this->intlCode = $intlCode;
  752. return $this;
  753. }
  754. /**
  755. * @return Collection<int, DistributorUserPermissions>
  756. */
  757. public function getDistributorUserPermissions(): Collection
  758. {
  759. return $this->distributorUserPermissions;
  760. }
  761. public function addDistributorUserPermission(DistributorUserPermissions $distributorUserPermission): self
  762. {
  763. if (!$this->distributorUserPermissions->contains($distributorUserPermission)) {
  764. $this->distributorUserPermissions[] = $distributorUserPermission;
  765. $distributorUserPermission->setDistributor($this);
  766. }
  767. return $this;
  768. }
  769. public function removeDistributorUserPermission(DistributorUserPermissions $distributorUserPermission): self
  770. {
  771. if ($this->distributorUserPermissions->removeElement($distributorUserPermission)) {
  772. // set the owning side to null (unless already changed)
  773. if ($distributorUserPermission->getDistributor() === $this) {
  774. $distributorUserPermission->setDistributor(null);
  775. }
  776. }
  777. return $this;
  778. }
  779. public function getApiDetails(): ?ApiDetails
  780. {
  781. return $this->api;
  782. }
  783. public function setApiDetails(ApiDetails $api): self
  784. {
  785. // set the owning side of the relation if necessary
  786. if ($api->getDistributor() !== $this) {
  787. $api->setDistributor($this);
  788. }
  789. $this->api = $api;
  790. return $this;
  791. }
  792. /**
  793. * @return Collection<int, DistributorClinics>
  794. */
  795. public function getDistributorClinics(): Collection
  796. {
  797. return $this->distributorClinics;
  798. }
  799. public function addDistributorClinic(DistributorClinics $distributorClinic): self
  800. {
  801. if (!$this->distributorClinics->contains($distributorClinic)) {
  802. $this->distributorClinics[] = $distributorClinic;
  803. $distributorClinic->setDistributor($this);
  804. }
  805. return $this;
  806. }
  807. public function removeDistributorClinic(DistributorClinics $distributorClinic): self
  808. {
  809. if ($this->distributorClinics->removeElement($distributorClinic)) {
  810. // set the owning side to null (unless already changed)
  811. if ($distributorClinic->getDistributor() === $this) {
  812. $distributorClinic->setDistributor(null);
  813. }
  814. }
  815. return $this;
  816. }
  817. public function getHashedEmail(): ?string
  818. {
  819. return $this->hashedEmail;
  820. }
  821. public function setHashedEmail(?string $hashedEmail): self
  822. {
  823. $this->hashedEmail = $hashedEmail;
  824. return $this;
  825. }
  826. public function getTracking(): ?Tracking
  827. {
  828. return $this->tracking;
  829. }
  830. public function setTracking(?Tracking $tracking): self
  831. {
  832. $this->tracking = $tracking;
  833. return $this;
  834. }
  835. public function getDomainName(): ?string
  836. {
  837. return $this->domainName;
  838. }
  839. public function setDomainName(?string $domainName): self
  840. {
  841. $this->domainName = $domainName;
  842. return $this;
  843. }
  844. public function getIsApproved(): ?int
  845. {
  846. return $this->isApproved;
  847. }
  848. public function setIsApproved(?int $isApproved): self
  849. {
  850. $this->isApproved = $isApproved;
  851. return $this;
  852. }
  853. public function getManagerFirstName(): ?string
  854. {
  855. return $this->managerFirstName;
  856. }
  857. public function setManagerFirstName(?string $managerFirstName): self
  858. {
  859. $this->managerFirstName = $managerFirstName;
  860. return $this;
  861. }
  862. public function getManagerLastName(): ?string
  863. {
  864. return $this->managerLastName;
  865. }
  866. public function setManagerLastName(?string $managerLastName): self
  867. {
  868. $this->managerLastName = $managerLastName;
  869. return $this;
  870. }
  871. public function getTradeLicense(): ?string
  872. {
  873. return $this->tradeLicense;
  874. }
  875. public function setTradeLicense(?string $tradeLicense): self
  876. {
  877. $this->tradeLicense = $tradeLicense;
  878. return $this;
  879. }
  880. public function getTradeLicenseNo(): ?string
  881. {
  882. return $this->tradeLicenseNo;
  883. }
  884. public function setTradeLicenseNo(?string $tradeLicenseNo): self
  885. {
  886. $this->tradeLicenseNo = $tradeLicenseNo;
  887. return $this;
  888. }
  889. public function getTradeLicenseExpDate(): ?\DateTimeInterface
  890. {
  891. return $this->tradeLicenseExpDate;
  892. }
  893. public function setTradeLicenseExpDate(?\DateTimeInterface $tradeLicenseExpDate): self
  894. {
  895. $this->tradeLicenseExpDate = $tradeLicenseExpDate;
  896. return $this;
  897. }
  898. public function getManagerIdNo(): ?string
  899. {
  900. return $this->managerIdNo;
  901. }
  902. public function setManagerIdNo(?string $managerIdNo): self
  903. {
  904. $this->managerIdNo = $managerIdNo;
  905. return $this;
  906. }
  907. public function getManagerIdExpDate(): ?\DateTimeInterface
  908. {
  909. return $this->managerIdExpDate;
  910. }
  911. public function setManagerIdExpDate(?\DateTimeInterface $managerIdExpDate): self
  912. {
  913. $this->managerIdExpDate = $managerIdExpDate;
  914. return $this;
  915. }
  916. /**
  917. * @return Collection<int, ControlledDrugFiles>
  918. */
  919. public function getControlledDrugFiles(): Collection
  920. {
  921. return $this->controlledDrugFiles;
  922. }
  923. public function addControlledDrugFile(ControlledDrugFiles $controlledDrugFile): self
  924. {
  925. if (!$this->controlledDrugFiles->contains($controlledDrugFile)) {
  926. $this->controlledDrugFiles[] = $controlledDrugFile;
  927. $controlledDrugFile->setDistributor($this);
  928. }
  929. return $this;
  930. }
  931. public function removeControlledDrugFile(ControlledDrugFiles $controlledDrugFile): self
  932. {
  933. if ($this->controlledDrugFiles->removeElement($controlledDrugFile)) {
  934. // set the owning side to null (unless already changed)
  935. if ($controlledDrugFile->getDistributor() === $this) {
  936. $controlledDrugFile->setDistributor(null);
  937. }
  938. }
  939. return $this;
  940. }
  941. /**
  942. * @return Collection<int, CustomPriceLists>
  943. */
  944. public function getCustomPriceLists(): Collection
  945. {
  946. return $this->customPriceLists;
  947. }
  948. public function addCustomPriceList(CustomPriceLists $customPriceList): static
  949. {
  950. if (!$this->customPriceLists->contains($customPriceList)) {
  951. $this->customPriceLists->add($customPriceList);
  952. $customPriceList->setDistributor($this);
  953. }
  954. return $this;
  955. }
  956. public function removeCustomPriceList(CustomPriceLists $customPriceList): static
  957. {
  958. if ($this->customPriceLists->removeElement($customPriceList)) {
  959. // set the owning side to null (unless already changed)
  960. if ($customPriceList->getDistributor() === $this) {
  961. $customPriceList->setDistributor(null);
  962. }
  963. }
  964. return $this;
  965. }
  966. public function getScraperAunthentication(): ?ScraperAunthentication
  967. {
  968. return $this->scraperAunthentication;
  969. }
  970. public function setScraperAunthentication(ScraperAunthentication $scraperAunthentication): static
  971. {
  972. // set the owning side of the relation if necessary
  973. if ($scraperAunthentication->getDistributor() !== $this) {
  974. $scraperAunthentication->setDistributor($this);
  975. }
  976. $this->scraperAunthentication = $scraperAunthentication;
  977. return $this;
  978. }
  979. /**
  980. * @return Collection<int, ScraperUrls>
  981. */
  982. public function getScraperUrls(): Collection
  983. {
  984. return $this->scraperUrls;
  985. }
  986. public function addScraperUrl(ScraperUrls $scraperUrl): static
  987. {
  988. if (!$this->scraperUrls->contains($scraperUrl)) {
  989. $this->scraperUrls->add($scraperUrl);
  990. $scraperUrl->setDistributor($this);
  991. }
  992. return $this;
  993. }
  994. public function removeScraperUrl(ScraperUrls $scraperUrl): static
  995. {
  996. if ($this->scraperUrls->removeElement($scraperUrl)) {
  997. // set the owning side to null (unless already changed)
  998. if ($scraperUrl->getDistributor() === $this) {
  999. $scraperUrl->setDistributor(null);
  1000. }
  1001. }
  1002. return $this;
  1003. }
  1004. /**
  1005. * @return Collection<int, ClinicDistributorContacts>
  1006. */
  1007. public function getClinicDistributorContacts(): Collection
  1008. {
  1009. return $this->clinicDistributorContacts;
  1010. }
  1011. public function addClinicDistributorContact(ClinicDistributorContacts $clinicDistributorContact): static
  1012. {
  1013. if (!$this->clinicDistributorContacts->contains($clinicDistributorContact)) {
  1014. $this->clinicDistributorContacts->add($clinicDistributorContact);
  1015. $clinicDistributorContact->setDistributor($this);
  1016. }
  1017. return $this;
  1018. }
  1019. public function removeClinicDistributorContact(ClinicDistributorContacts $clinicDistributorContact): static
  1020. {
  1021. if ($this->clinicDistributorContacts->removeElement($clinicDistributorContact)) {
  1022. // set the owning side to null (unless already changed)
  1023. if ($clinicDistributorContact->getDistributor() === $this) {
  1024. $clinicDistributorContact->setDistributor(null);
  1025. }
  1026. }
  1027. return $this;
  1028. }
  1029. /**
  1030. * @return Collection<int, ScraperLog>
  1031. */
  1032. public function getScraperLogs(): Collection
  1033. {
  1034. return $this->scraperLogs;
  1035. }
  1036. public function addScraperLog(ScraperLog $scraperLog): static
  1037. {
  1038. if (!$this->scraperLogs->contains($scraperLog)) {
  1039. $this->scraperLogs->add($scraperLog);
  1040. $scraperLog->setDistributor($this);
  1041. }
  1042. return $this;
  1043. }
  1044. public function removeScraperLog(ScraperLog $scraperLog): static
  1045. {
  1046. if ($this->scraperLogs->removeElement($scraperLog)) {
  1047. // set the owning side to null (unless already changed)
  1048. if ($scraperLog->getDistributor() === $this) {
  1049. $scraperLog->setDistributor(null);
  1050. }
  1051. }
  1052. return $this;
  1053. }
  1054. /**
  1055. * @return Collection<int, ScraperProducts>
  1056. */
  1057. public function getScraperProducts(): Collection
  1058. {
  1059. return $this->scraperProducts;
  1060. }
  1061. public function addScraperProduct(ScraperProducts $scraperProduct): static
  1062. {
  1063. if (!$this->scraperProducts->contains($scraperProduct)) {
  1064. $this->scraperProducts->add($scraperProduct);
  1065. $scraperProduct->setDistributor($this);
  1066. }
  1067. return $this;
  1068. }
  1069. public function removeScraperProduct(ScraperProducts $scraperProduct): static
  1070. {
  1071. if ($this->scraperProducts->removeElement($scraperProduct)) {
  1072. // set the owning side to null (unless already changed)
  1073. if ($scraperProduct->getDistributor() === $this) {
  1074. $scraperProduct->setDistributor(null);
  1075. }
  1076. }
  1077. return $this;
  1078. }
  1079. /**
  1080. * @return Collection<int, AiDistributorProducts>
  1081. */
  1082. public function getAiDistributorProducts(): Collection
  1083. {
  1084. return $this->aiDistributorProducts;
  1085. }
  1086. public function addAiDistributorProduct(AiDistributorProducts $aiDistributorProduct): static
  1087. {
  1088. if (!$this->aiDistributorProducts->contains($aiDistributorProduct)) {
  1089. $this->aiDistributorProducts->add($aiDistributorProduct);
  1090. $aiDistributorProduct->setDistributor($this);
  1091. }
  1092. return $this;
  1093. }
  1094. public function removeAiDistributorProduct(AiDistributorProducts $aiDistributorProduct): static
  1095. {
  1096. if ($this->aiDistributorProducts->removeElement($aiDistributorProduct)) {
  1097. // set the owning side to null (unless already changed)
  1098. if ($aiDistributorProduct->getDistributor() === $this) {
  1099. $aiDistributorProduct->setDistributor(null);
  1100. }
  1101. }
  1102. return $this;
  1103. }
  1104. /**
  1105. * @return Collection<int, AiListItems>
  1106. */
  1107. public function getAiListItems(): Collection
  1108. {
  1109. return $this->aiListItems;
  1110. }
  1111. public function addAiListItem(AiListItems $aiListItem): static
  1112. {
  1113. if (!$this->aiListItems->contains($aiListItem)) {
  1114. $this->aiListItems->add($aiListItem);
  1115. $aiListItem->setDistributor($this);
  1116. }
  1117. return $this;
  1118. }
  1119. public function removeAiListItem(AiListItems $aiListItem): static
  1120. {
  1121. if ($this->aiListItems->removeElement($aiListItem)) {
  1122. // set the owning side to null (unless already changed)
  1123. if ($aiListItem->getDistributor() === $this) {
  1124. $aiListItem->setDistributor(null);
  1125. }
  1126. }
  1127. return $this;
  1128. }
  1129. /**
  1130. * @return Collection<int, AiBasketItems>
  1131. */
  1132. public function getAiBasketItems(): Collection
  1133. {
  1134. return $this->aiBasketItems;
  1135. }
  1136. public function addAiBasketItem(AiBasketItems $aiBasketItem): static
  1137. {
  1138. if (!$this->aiBasketItems->contains($aiBasketItem)) {
  1139. $this->aiBasketItems->add($aiBasketItem);
  1140. $aiBasketItem->setDistributor($this);
  1141. }
  1142. return $this;
  1143. }
  1144. public function removeAiBasketItem(AiBasketItems $aiBasketItem): static
  1145. {
  1146. if ($this->aiBasketItems->removeElement($aiBasketItem)) {
  1147. // set the owning side to null (unless already changed)
  1148. if ($aiBasketItem->getDistributor() === $this) {
  1149. $aiBasketItem->setDistributor(null);
  1150. }
  1151. }
  1152. return $this;
  1153. }
  1154. /**
  1155. * @return Collection<int, AiOrderItems>
  1156. */
  1157. public function getAiOrderItems(): Collection
  1158. {
  1159. return $this->aiOrderItems;
  1160. }
  1161. public function addAiOrderItem(AiOrderItems $aiOrderItem): static
  1162. {
  1163. if (!$this->aiOrderItems->contains($aiOrderItem)) {
  1164. $this->aiOrderItems->add($aiOrderItem);
  1165. $aiOrderItem->setDistributor($this);
  1166. }
  1167. return $this;
  1168. }
  1169. public function removeAiOrderItem(AiOrderItems $aiOrderItem): static
  1170. {
  1171. if ($this->aiOrderItems->removeElement($aiOrderItem)) {
  1172. // set the owning side to null (unless already changed)
  1173. if ($aiOrderItem->getDistributor() === $this) {
  1174. $aiOrderItem->setDistributor(null);
  1175. }
  1176. }
  1177. return $this;
  1178. }
  1179. /**
  1180. * @return Collection<int, AiClinicProducts>
  1181. */
  1182. public function getAiClinicProducts(): Collection
  1183. {
  1184. return $this->aiClinicProducts;
  1185. }
  1186. public function addAiCinicProduct(AiClinicProducts $aiCinicProduct): static
  1187. {
  1188. if (!$this->aiClinicProducts->contains($aiCinicProduct)) {
  1189. $this->aiClinicProducts->add($aiCinicProduct);
  1190. $aiCinicProduct->setDistributor($this);
  1191. }
  1192. return $this;
  1193. }
  1194. public function removeAiCinicProduct(AiClinicProducts $aiCinicProduct): static
  1195. {
  1196. if ($this->aiClinicProducts->removeElement($aiCinicProduct)) {
  1197. // set the owning side to null (unless already changed)
  1198. if ($aiCinicProduct->getDistributor() === $this) {
  1199. $aiCinicProduct->setDistributor(null);
  1200. }
  1201. }
  1202. return $this;
  1203. }
  1204. /**
  1205. * @return Collection<int, AiCustomPriceLists>
  1206. */
  1207. public function getAiCustomPriceLists(): Collection
  1208. {
  1209. return $this->aiCustomPriceLists;
  1210. }
  1211. public function addAiCustomPriceList(AiCustomPriceLists $aiCustomPriceList): static
  1212. {
  1213. if (!$this->aiCustomPriceLists->contains($aiCustomPriceList)) {
  1214. $this->aiCustomPriceLists->add($aiCustomPriceList);
  1215. $aiCustomPriceList->setDistributor($this);
  1216. }
  1217. return $this;
  1218. }
  1219. public function removeAiCustomPriceList(AiCustomPriceLists $aiCustomPriceList): static
  1220. {
  1221. if ($this->aiCustomPriceLists->removeElement($aiCustomPriceList)) {
  1222. // set the owning side to null (unless already changed)
  1223. if ($aiCustomPriceList->getDistributor() === $this) {
  1224. $aiCustomPriceList->setDistributor(null);
  1225. }
  1226. }
  1227. return $this;
  1228. }
  1229. /**
  1230. * @return Collection<int, AiControlledDrugFiles>
  1231. */
  1232. public function getAiControlledDrugFiles(): Collection
  1233. {
  1234. return $this->aiControlledDrugFiles;
  1235. }
  1236. public function addAiControlledDrugFile(AiControlledDrugFiles $aiControlledDrugFile): static
  1237. {
  1238. if (!$this->aiControlledDrugFiles->contains($aiControlledDrugFile)) {
  1239. $this->aiControlledDrugFiles->add($aiControlledDrugFile);
  1240. $aiControlledDrugFile->setDistributor($this);
  1241. }
  1242. return $this;
  1243. }
  1244. public function removeAiControlledDrugFile(AiControlledDrugFiles $aiControlledDrugFile): static
  1245. {
  1246. if ($this->aiControlledDrugFiles->removeElement($aiControlledDrugFile)) {
  1247. // set the owning side to null (unless already changed)
  1248. if ($aiControlledDrugFile->getDistributor() === $this) {
  1249. $aiControlledDrugFile->setDistributor(null);
  1250. }
  1251. }
  1252. return $this;
  1253. }
  1254. /**
  1255. * @return Collection<int, AiOrderStatus>
  1256. */
  1257. public function getAiOrderStatuses(): Collection
  1258. {
  1259. return $this->aiOrderStatuses;
  1260. }
  1261. public function addAiOrderStatus(AiOrderStatus $aiOrderStatus): static
  1262. {
  1263. if (!$this->aiOrderStatuses->contains($aiOrderStatus)) {
  1264. $this->aiOrderStatuses->add($aiOrderStatus);
  1265. $aiOrderStatus->setDistributor($this);
  1266. }
  1267. return $this;
  1268. }
  1269. public function removeAiOrderStatus(AiOrderStatus $aiOrderStatus): static
  1270. {
  1271. if ($this->aiOrderStatuses->removeElement($aiOrderStatus)) {
  1272. // set the owning side to null (unless already changed)
  1273. if ($aiOrderStatus->getDistributor() === $this) {
  1274. $aiOrderStatus->setDistributor(null);
  1275. }
  1276. }
  1277. return $this;
  1278. }
  1279. public function getHasScraper(): ?bool
  1280. {
  1281. return $this->hasScraper;
  1282. }
  1283. public function setHasScraper(bool $hasScraper): static
  1284. {
  1285. $this->hasScraper = $hasScraper;
  1286. return $this;
  1287. }
  1288. public function getName(): ?string
  1289. {
  1290. return $this->name;
  1291. }
  1292. public function setName(?string $name): static
  1293. {
  1294. $this->name = $name;
  1295. return $this;
  1296. }
  1297. }