src/Entity/Distributors.php line 11

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