src/Entity/Customer.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Utils\ExtendedEntity;
  4. use DateTime;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Component\Security\Core\User\UserInterface;
  9. /**
  10.  * @ORM\Entity(repositoryClass="App\Repository\CustomerRepository")
  11.  */
  12. class Customer implements UserInterface
  13. {
  14.     use ExtendedEntity;
  15.     /**
  16.      * @ORM\Id()
  17.      * @ORM\GeneratedValue()
  18.      * @ORM\Column(type="integer")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\Column(type="string", length=255, nullable=true)
  23.      */
  24.     private $companyName;
  25.     /**
  26.      * @ORM\Column(type="bigint")
  27.      */
  28.     private $NIP;
  29.     /**
  30.      * @ORM\Column(type="string", length=255)
  31.      */
  32.     private $username;
  33.     /**
  34.      * @ORM\Column(type="string", length=255)
  35.      */
  36.     private $password;
  37.     /**
  38.      * @ORM\Column(type="string", length=32, nullable=true)
  39.      */
  40.     private $phoneNumber;
  41.     /**
  42.      * @ORM\Column(type="datetime", nullable=true)
  43.      */
  44.     private $lastInquiryDate;
  45.     /**
  46.      * @ORM\Column(type="datetime", nullable=true)
  47.      */
  48.     private $lastOfferDate;
  49.     /**
  50.      * @ORM\Column(type="boolean", options={"default" : true})
  51.      */
  52.     private $isRecipient true;
  53.     /**
  54.      * @ORM\Column(type="boolean", options={"default" : false})
  55.      */
  56.     private $isSupplier false;
  57.     /** @ORM\Column(type="array", nullable=true) */
  58.     private $roles = ['ROLE_USER'];
  59.     /** @ORM\Column(type="string", length=255, nullable=true) */
  60.     private $salt;
  61.     /** @ORM\Column(type="string", length=255, nullable=true) */
  62.     private $registerKey;
  63.     /**
  64.      * @ORM\OneToMany(targetEntity="App\Entity\Inquiry", mappedBy="recipient", orphanRemoval=true)
  65.      */
  66.     private $inquiries;
  67.     /**
  68.      * @ORM\OneToMany(targetEntity="App\Entity\Offer", mappedBy="supplier", orphanRemoval=true)
  69.      */
  70.     private $offers;
  71.     /**
  72.      * @ORM\OneToMany(targetEntity="App\Entity\Rating", mappedBy="owner", orphanRemoval=true)
  73.      */
  74.     private $ratings;
  75.     /**
  76.      * @ORM\OneToMany(targetEntity="App\Entity\PrivateMessage", mappedBy="author")
  77.      */
  78.     private $privateMessages;
  79.     /**
  80.      * @ORM\OneToMany(targetEntity="App\Entity\PrivateMessage", mappedBy="recipient")
  81.      */
  82.     private $receivedMessages;
  83.     /**
  84.      * @ORM\ManyToMany(targetEntity="App\Entity\Make")
  85.      */
  86.     private $makes;
  87.     /**
  88.      * @ORM\Column(type="string", length=128, nullable=true)
  89.      */
  90.     private $resetPasswordKey;
  91.     /**
  92.      * @ORM\Column(type="string", length=255, nullable=true)
  93.      */
  94.     private $zipCode;
  95.     /**
  96.      * @ORM\Column(type="string", length=255, nullable=true)
  97.      */
  98.     private $city;
  99.     /**
  100.      * @ORM\Column(type="string", length=255, nullable=true)
  101.      */
  102.     private $street;
  103.     /**
  104.      * @ORM\Column(type="string", length=255, nullable=true)
  105.      */
  106.     private $propertyNumber;
  107.     /**
  108.      * @ORM\Column(type="string", length=255, nullable=true)
  109.      */
  110.     private $apartmentNumber;
  111.     /**
  112.      * @ORM\Column(type="boolean", options={"default": false})
  113.      */
  114.     private $showOtherOffers;
  115.     /**
  116.      * @ORM\Column(type="boolean", options={"default": false})
  117.      */
  118.     private $dontShowCompanyNameOtherOffers false;
  119.     /**
  120.      * @ORM\Column(type="boolean", options={"default": false})
  121.      */
  122.     private $igp false;
  123.     /**
  124.      * @ORM\OneToMany(targetEntity="App\Entity\CustomerAddress", mappedBy="customer", orphanRemoval=true, cascade={"persist"})
  125.      */
  126.     private $addresses;
  127.     /**
  128.      * @ORM\OneToMany(targetEntity="App\Entity\CustomerInvoiceAddress", mappedBy="customer", orphanRemoval=true, cascade={"persist"})
  129.      */
  130.     private $invoiceAddresses;
  131.     /**
  132.      * @ORM\OneToMany(targetEntity="App\Entity\ContactPerson", mappedBy="customer", orphanRemoval=true, cascade={"persist"})
  133.      */
  134.     private $persons;
  135.     /**
  136.      * @ORM\Column(type="boolean", options={"default": false})
  137.      */
  138.     private $canChooseSuppliers true;
  139.     /**
  140.      * @ORM\Column(type="boolean", options={"default": false})
  141.      */
  142.     private $canSeeSupplierData;
  143.     /**
  144.      * @ORM\OneToMany(targetEntity="App\Entity\Notification", mappedBy="author")
  145.      */
  146.     private $notifications_author;
  147.     /**
  148.      * @ORM\OneToMany(targetEntity="App\Entity\Notification", mappedBy="recipient")
  149.      */
  150.     private $notifications;
  151.     /**
  152.      * @ORM\Column(type="boolean", options={"default": false})
  153.      */
  154.     private $showOtherOffersBeforePurchase true;
  155.     /**
  156.      * @ORM\Column(type="boolean", options={"default": false})
  157.      */
  158.     private $showOnlyRetailPriceAndDeliveryDate false;
  159.     /** @ORM\Column(type="boolean", options={"default": true}) */
  160.     private $notificationsOfferNotification true;
  161.     /** @ORM\Column(type="boolean", options={"default": true}) */
  162.     private $notificationsOfferMail true;
  163.     /** @ORM\Column(type="boolean", options={"default": true}) */
  164.     private $notificationsInquiryNotification true;
  165.     /** @ORM\Column(type="boolean", options={"default": true}) */
  166.     private $notificationsInquiryMail true;
  167.     /** @ORM\Column(type="boolean", options={"default": true}) */
  168.     private $notificationsInvoiceNotification true;
  169.     /** @ORM\Column(type="boolean", options={"default": true}) */
  170.     private $notificationsInvoiceMail true;
  171.     /** @ORM\Column(type="boolean", options={"default": false}) */
  172.     private $canDeletePrivateMessages false;
  173.     /** @ORM\Column(type="boolean", options={"default": true}) */
  174.     private $canSeeOtherSuppliersOfHisMakes false;
  175.     /** @ORM\Column(type="boolean", options={"default": true}) */
  176.     private $canGetNotificationsAboutBetterOffer true;
  177.     /** @ORM\Column(type="boolean", options={"default": false}) */
  178.     private $deliveryForWholeCountry false;
  179.     /** @ORM\Column(type="boolean", options={"default": false}) */
  180.     private $showMessageForCustomer false;
  181.     /** @ORM\Column(type="text", nullable=true) */
  182.     private $messageForCustomer;
  183.     /** @ORM\Column(type="boolean", options={"default": false}) */
  184.     private $warnSuppliersAboutThisCustomerPayments false;
  185.     /** @ORM\Column(type="boolean", options={"default": false}) */
  186.     private $avoidUserForCreateNewInquiries false;
  187.     /** @ORM\Column(type="boolean", options={"default": true}) */
  188.     private $showStatsForSupplier true;
  189.     /** @ORM\Column(type="text", nullable=true) */
  190.     private $supplierCard '';
  191.     /** @ORM\Column(type="string", length=255, nullable=true) */
  192.     private $supplierCardShort;
  193.     /** @ORM\Column(type="boolean", options={"default": false}) */
  194.     private $supplierCardActive false;
  195.     /** @ORM\Column(type="boolean", options={"default": false}) */
  196.     private $showWonOffersTotalValue false;
  197.     /** @ORM\Column(type="boolean", options={"default": false}) */
  198.     private $showOrderedPartsStats false;
  199.     /** @ORM\ManyToMany(targetEntity="App\Entity\Inquiry", orphanRemoval=true, mappedBy="choosedSuppliers" ) */
  200.     private $choosedForInquiries;
  201.     /** @ORM\Column(type="boolean", options={"default" : false}) */
  202.     private bool $regulationsAccepted false;
  203.     //pola wyliczeniowe
  204.     /** @var ?string */
  205.     private $lastLogin null;
  206.     /** @var ?string */
  207.     private $lastOrderDate null;
  208.     /** @var ?string */
  209.     private $lastPeriodOrderValue null;
  210.     /** @var ?string */
  211.     private $lastPeriodSellValue null;
  212.     /** @var ?int */
  213.     private $loginCount null;
  214.     /** @var ?int */
  215.     private $inquiriesCount null;
  216.     /** @var ?int */
  217.     private $offersCount null;
  218.     public function __construct(string $username null) {
  219.         $this->username $username;
  220.         $this->salt md5(uniqid('salt'true));
  221.         $this->createdAt = new DateTime();
  222.         $this->registerKey md5(uniqid('registerKey'true));
  223.         $this->inquiries = new ArrayCollection();
  224.         $this->offers = new ArrayCollection();
  225.         $this->password '';
  226.         $this->ratings = new ArrayCollection();
  227.         $this->privateMessages = new ArrayCollection();
  228.         $this->receivedMessages = new ArrayCollection();
  229.         $this->makes = new ArrayCollection();
  230.         $this->addresses = new ArrayCollection();
  231.         $this->invoiceAddresses = new ArrayCollection();
  232.         $this->notifications = new ArrayCollection();
  233.         $this->persons = new ArrayCollection();
  234.     }
  235.     public function getId(): ?int
  236.     {
  237.         return $this->id;
  238.     }
  239.     public function getCompanyName(): ?string
  240.     {
  241.         return $this->companyName;
  242.     }
  243.     public function setCompanyName(string $companyName): self
  244.     {
  245.         $this->companyName $companyName;
  246.         return $this;
  247.     }
  248.     public function getNIP(): ?int
  249.     {
  250.         return $this->NIP;
  251.     }
  252.     public function setNIP($NIP): self
  253.     {
  254.         $this->NIP preg_replace("/[^0-9]+/"""$NIP);
  255.         return $this;
  256.     }
  257.     public function getUsername(): ?string
  258.     {
  259.         return $this->username;
  260.     }
  261.     public function setUsername(string $username): self
  262.     {
  263.         $this->username $username;
  264.         return $this;
  265.     }
  266.     public function getPassword(): ?string
  267.     {
  268.         return $this->password;
  269.     }
  270.     public function setPassword(string $password): self
  271.     {
  272.         $this->password $password;
  273.         return $this;
  274.     }
  275.     public function getPhoneNumber(): ?string
  276.     {
  277.         return $this->phoneNumber;
  278.     }
  279.     public function setPhoneNumber(?string $phoneNumber): self
  280.     {
  281.         $this->phoneNumber $phoneNumber;
  282.         return $this;
  283.     }
  284.     public function getLastInquiryDate(): ?\DateTimeInterface
  285.     {
  286.         return $this->lastInquiryDate;
  287.     }
  288.     public function setLastInquiryDate(?\DateTimeInterface $lastInquiryDate): self
  289.     {
  290.         $this->lastInquiryDate $lastInquiryDate;
  291.         return $this;
  292.     }
  293.     public function getLastOfferDate(): ?\DateTimeInterface
  294.     {
  295.         return $this->lastOfferDate;
  296.     }
  297.     public function setLastOfferDate(?\DateTimeInterface $lastOfferDate): self
  298.     {
  299.         $this->lastOfferDate $lastOfferDate;
  300.         return $this;
  301.     }
  302.     public function getIsRecipient(): ?bool
  303.     {
  304.         return $this->isRecipient;
  305.     }
  306.     public function setIsRecipient(bool $isRecipient): self
  307.     {
  308.         $this->isRecipient $isRecipient;
  309.         return $this;
  310.     }
  311.     public function getIsSupplier(): ?bool
  312.     {
  313.         return $this->isSupplier;
  314.     }
  315.     public function setIsSupplier(bool $isSupplier): self
  316.     {
  317.         $this->isSupplier $isSupplier;
  318.         return $this;
  319.     }
  320.     public function setRoles(array $roles)
  321.     {
  322.         $this->roles $roles;
  323.     }
  324.     public function eraseCredentials()
  325.     {
  326.     }
  327.     public function getRoles() : ?array
  328.     {
  329.         return $this->roles;
  330.     }
  331.     public function getSalt() : ?string
  332.     {
  333.         return $this->salt;
  334.     }
  335.     public function getRegisterKey() : ?string
  336.     {
  337.         return $this->registerKey;
  338.     }
  339.     public function setRegisterKey(?string $registerKey)
  340.     {
  341.         $this->registerKey $registerKey;
  342.     }
  343.     /**
  344.      * @return Collection|Inquiry[]
  345.      */
  346.     public function getInquiries(): Collection
  347.     {
  348.         return $this->inquiries;
  349.     }
  350.     public function addInquiry(Inquiry $inquiry): self
  351.     {
  352.         if (!$this->inquiries->contains($inquiry)) {
  353.             $this->inquiries[] = $inquiry;
  354.             $inquiry->setRecipient($this);
  355.         }
  356.         return $this;
  357.     }
  358.     public function removeInquiry(Inquiry $inquiry): self
  359.     {
  360.         if ($this->inquiries->contains($inquiry)) {
  361.             $this->inquiries->removeElement($inquiry);
  362.             // set the owning side to null (unless already changed)
  363.             if ($inquiry->getRecipient() === $this) {
  364.                 $inquiry->setRecipient(null);
  365.             }
  366.         }
  367.         return $this;
  368.     }
  369.     /**
  370.      * @return Collection|CustomerAddress[]
  371.      */
  372.     public function getAddresses(): Collection
  373.     {
  374.         return $this->addresses;
  375.     }
  376.     public function addAddress(CustomerAddress $address): self
  377.     {
  378.         if (!$this->addresses->contains($address)) {
  379.             $this->addresses[] = $address;
  380.             $address->setCustomer($this);
  381.         }
  382.         return $this;
  383.     }
  384.     public function setAddresses(ArrayCollection $addresses) : self
  385.     {
  386.         $this->addresses $addresses;
  387.         return $this;
  388.     }
  389.     public function removeAddress(CustomerAddress $address): self
  390.     {
  391.         if ($this->addresses->contains($address)) {
  392.             $this->addresses->removeElement($address);
  393.             if ($address->getCustomer() === $this) {
  394.                 $address->setCustomer(null);
  395.             }
  396.         }
  397.         return $this;
  398.     }
  399.     /* @return Collection|CustomerInvoiceAddress[] */
  400.     public function getInvoiceAddresses(): Collection
  401.     {
  402.         return $this->invoiceAddresses;
  403.     }
  404.     public function addInvoiceAddress(CustomerInvoiceAddress $invoiceAddress): self
  405.     {
  406.         if (!$this->invoiceAddresses->contains($invoiceAddress)) {
  407.             $this->invoiceAddresses[] = $invoiceAddress;
  408.             $invoiceAddress->setCustomer($this);
  409.         }
  410.         return $this;
  411.     }
  412.     public function setInvoiceAddresses(ArrayCollection $invoiceAddresses) : self
  413.     {
  414.         $this->invoiceAddresses $invoiceAddresses;
  415.         return $this;
  416.     }
  417.     public function removeInvoiceAddress(CustomerInvoiceAddress $invoiceAddress): self
  418.     {
  419.         if ($this->invoiceAddresses->contains($invoiceAddress)) {
  420.             $this->invoiceAddresses->removeElement($invoiceAddress);
  421.             if ($invoiceAddress->getCustomer() === $this) {
  422.                 $invoiceAddress->setCustomer(null);
  423.             }
  424.         }
  425.         return $this;
  426.     }
  427.     /** @return Collection|ContactPerson[] */
  428.     public function getPersons(): Collection
  429.     {
  430.         return $this->persons;
  431.     }
  432.     public function addPerson(ContactPerson $person): self
  433.     {
  434.         if (!$this->persons->contains($person)) {
  435.             $this->persons[] = $person;
  436.             $person->setCustomer($this);
  437.         }
  438.         return $this;
  439.     }
  440.     public function setPersons(ArrayCollection $persons) : self
  441.     {
  442.         $this->persons $persons;
  443.         return $this;
  444.     }
  445.     public function removePerson(ContactPerson $person): self
  446.     {
  447.         if ($this->persons->contains($person)) {
  448.             $this->persons->removeElement($person);
  449.             if ($person->getCustomer() === $this) {
  450.                 $person->setCustomer(null);
  451.             }
  452.         }
  453.         return $this;
  454.     }
  455.     /**
  456.      * @return Collection|Offer[]
  457.      */
  458.     public function getOffers(): Collection
  459.     {
  460.         return $this->offers;
  461.     }
  462.     public function addOffer(Offer $offer): self
  463.     {
  464.         if (!$this->offers->contains($offer)) {
  465.             $this->offers[] = $offer;
  466.             $offer->setSupplier($this);
  467.         }
  468.         return $this;
  469.     }
  470.     public function removeOffer(Offer $offer): self
  471.     {
  472.         if ($this->offers->contains($offer)) {
  473.             $this->offers->removeElement($offer);
  474.             // set the owning side to null (unless already changed)
  475.             if ($offer->getSupplier() === $this) {
  476.                 $offer->setSupplier(null);
  477.             }
  478.         }
  479.         return $this;
  480.     }
  481.     public function __toString()
  482.     {
  483.         if ($this->getCompanyName() !== null) {
  484.             return $this->getCompanyName();
  485.         } else {
  486.             return '';
  487.         }
  488.     }
  489.     /**
  490.      * @return Collection|Rating[]
  491.      */
  492.     public function getRatings(): Collection
  493.     {
  494.         return $this->ratings;
  495.     }
  496.     public function addRating(Rating $rating): self
  497.     {
  498.         if (!$this->ratings->contains($rating)) {
  499.             $this->ratings[] = $rating;
  500.             $rating->setAuthor($this);
  501.         }
  502.         return $this;
  503.     }
  504.     public function removeRating(Rating $rating): self
  505.     {
  506.         if ($this->ratings->contains($rating)) {
  507.             $this->ratings->removeElement($rating);
  508.             // set the owning side to null (unless already changed)
  509.             if ($rating->getAuthor() === $this) {
  510.                 $rating->setAuthor(null);
  511.             }
  512.         }
  513.         return $this;
  514.     }
  515.     /**
  516.      * @return Collection|PrivateMessage[]
  517.      */
  518.     public function getPrivateMessages(): Collection
  519.     {
  520.         return $this->privateMessages;
  521.     }
  522.     public function addPrivateMessage(PrivateMessage $privateMessage): self
  523.     {
  524.         if (!$this->privateMessages->contains($privateMessage)) {
  525.             $this->privateMessages[] = $privateMessage;
  526.             $privateMessage->setAuthor($this);
  527.         }
  528.         return $this;
  529.     }
  530.     public function removePrivateMessage(PrivateMessage $privateMessage): self
  531.     {
  532.         if ($this->privateMessages->contains($privateMessage)) {
  533.             $this->privateMessages->removeElement($privateMessage);
  534.             // set the owning side to null (unless already changed)
  535.             if ($privateMessage->getAuthor() === $this) {
  536.                 $privateMessage->setAuthor(null);
  537.             }
  538.         }
  539.         return $this;
  540.     }
  541.     /**
  542.      * @return Collection|PrivateMessage[]
  543.      */
  544.     public function getReceivedMessages(): Collection
  545.     {
  546.         return $this->receivedMessages;
  547.     }
  548.     public function addReceivedMessage(PrivateMessage $receivedMessage): self
  549.     {
  550.         if (!$this->receivedMessages->contains($receivedMessage)) {
  551.             $this->receivedMessages[] = $receivedMessage;
  552.             $receivedMessage->setRecipient($this);
  553.         }
  554.         return $this;
  555.     }
  556.     public function removeReceivedMessage(PrivateMessage $receivedMessage): self
  557.     {
  558.         if ($this->receivedMessages->contains($receivedMessage)) {
  559.             $this->receivedMessages->removeElement($receivedMessage);
  560.             // set the owning side to null (unless already changed)
  561.             if ($receivedMessage->getRecipient() === $this) {
  562.                 $receivedMessage->setRecipient(null);
  563.             }
  564.         }
  565.         return $this;
  566.     }
  567.     /**
  568.      * @return Collection|Make[]
  569.      */
  570.     public function getMakes(): Collection
  571.     {
  572.         return $this->makes;
  573.     }
  574.     public function addMake(Make $make): self
  575.     {
  576.         if (!$this->makes->contains($make)) {
  577.             $this->makes[] = $make;
  578.         }
  579.         return $this;
  580.     }
  581.     public function removeMake(Make $make): self
  582.     {
  583.         if ($this->makes->contains($make)) {
  584.             $this->makes->removeElement($make);
  585.         }
  586.         return $this;
  587.     }
  588.     public function getResetPasswordKey(): ?string
  589.     {
  590.         return $this->resetPasswordKey;
  591.     }
  592.     public function setResetPasswordKey(?string $resetPasswordKey): self
  593.     {
  594.         $this->resetPasswordKey $resetPasswordKey;
  595.         return $this;
  596.     }
  597.     public function getApartmentNumber()
  598.     {
  599.         return $this->apartmentNumber;
  600.     }
  601.     public function getCity()
  602.     {
  603.         return $this->city;
  604.     }
  605.     public function getPropertyNumber()
  606.     {
  607.         return $this->propertyNumber;
  608.     }
  609.     public function getStreet()
  610.     {
  611.         return $this->street;
  612.     }
  613.     public function getZipCode()
  614.     {
  615.         return $this->zipCode;
  616.     }
  617.     public function setApartmentNumber($apartmentNumber)
  618.     {
  619.         $this->apartmentNumber $apartmentNumber;
  620.     }
  621.     public function setCity($city)
  622.     {
  623.         $this->city $city;
  624.     }
  625.     public function setPropertyNumber($propertyNumber)
  626.     {
  627.         $this->propertyNumber $propertyNumber;
  628.     }
  629.     public function setStreet($street)
  630.     {
  631.         $this->street $street;
  632.     }
  633.     public function setZipCode($zipCode)
  634.     {
  635.         $this->zipCode $zipCode;
  636.     }
  637.     public function getShowOtherOffers()
  638.     {
  639.         return $this->showOtherOffers;
  640.     }
  641.     public function setShowOtherOffers($showOtherOffers): void
  642.     {
  643.         $this->showOtherOffers $showOtherOffers;
  644.     }
  645.     public function getCanChooseSuppliers()
  646.     {
  647.         return $this->canChooseSuppliers;
  648.     }
  649.     public function setCanChooseSuppliers($canChooseSuppliers)
  650.     {
  651.         $this->canChooseSuppliers $canChooseSuppliers;
  652.         return $this;
  653.     }
  654.     public function getCanSeeSupplierData()
  655.     {
  656.         return $this->canSeeSupplierData;
  657.     }
  658.     public function setCanSeeSupplierData($canSeeSupplierData)
  659.     {
  660.         $this->canSeeSupplierData $canSeeSupplierData;
  661.         return $this;
  662.     }
  663.     /**
  664.      * @return Collection|Notification[]
  665.      */
  666.     public function getNotifications(): Collection
  667.     {
  668.         return $this->notifications;
  669.     }
  670.     public function addNotification(Notification $notification): self
  671.     {
  672.         if (!$this->notifications->contains($notification)) {
  673.             $this->notifications[] = $notification;
  674.             $notification->setAuthor($this);
  675.         }
  676.         return $this;
  677.     }
  678.     public function removeNotification(Notification $notification): self
  679.     {
  680.         if ($this->notifications->contains($notification)) {
  681.             $this->notifications->removeElement($notification);
  682.             // set the owning side to null (unless already changed)
  683.             if ($notification->getAuthor() === $this) {
  684.                 $notification->setAuthor(null);
  685.             }
  686.         }
  687.         return $this;
  688.     }
  689.     /**
  690.      * @return Collection|Notification[]
  691.      */
  692.     public function getNotificationsAuthor(): Collection
  693.     {
  694.         return $this->notifications_author;
  695.     }
  696.     public function addNotificationsAuthor(Notification $notificationsAuthor): self
  697.     {
  698.         if (!$this->notifications_author->contains($notificationsAuthor)) {
  699.             $this->notifications_author[] = $notificationsAuthor;
  700.             $notificationsAuthor->setAuthor($this);
  701.         }
  702.         return $this;
  703.     }
  704.     public function removeNotificationsAuthor(Notification $notificationsAuthor): self
  705.     {
  706.         if ($this->notifications_author->contains($notificationsAuthor)) {
  707.             $this->notifications_author->removeElement($notificationsAuthor);
  708.             // set the owning side to null (unless already changed)
  709.             if ($notificationsAuthor->getAuthor() === $this) {
  710.                 $notificationsAuthor->setAuthor(null);
  711.             }
  712.         }
  713.         return $this;
  714.     }
  715.     /**
  716.      * @return mixed
  717.      */
  718.     public function getShowOtherOffersBeforePurchase()
  719.     {
  720.         return $this->showOtherOffersBeforePurchase;
  721.     }
  722.     /**
  723.      * @param mixed $showOtherOffersBeforePurchase
  724.      */
  725.     public function setShowOtherOffersBeforePurchase($showOtherOffersBeforePurchase): void
  726.     {
  727.         $this->showOtherOffersBeforePurchase $showOtherOffersBeforePurchase;
  728.     }
  729.     /** @param bool $notificationsInquiryMail */
  730.     public function setNotificationsInquiryMail(bool $notificationsInquiryMail): void
  731.     {
  732.         $this->notificationsInquiryMail $notificationsInquiryMail;
  733.     }
  734.     /** @param bool $notificationsInquiryNotification */
  735.     public function setNotificationsInquiryNotification(bool $notificationsInquiryNotification): void
  736.     {
  737.         $this->notificationsInquiryNotification $notificationsInquiryNotification;
  738.     }
  739.     /** @param bool $notificationsInvoiceMail */
  740.     public function setNotificationsInvoiceMail(bool $notificationsInvoiceMail): void
  741.     {
  742.         $this->notificationsInvoiceMail $notificationsInvoiceMail;
  743.     }
  744.     /** @param bool $notificationsInvoiceNotification */
  745.     public function setNotificationsInvoiceNotification(bool $notificationsInvoiceNotification): void
  746.     {
  747.         $this->notificationsInvoiceNotification $notificationsInvoiceNotification;
  748.     }
  749.     /** @param bool $notificationsOfferMail */
  750.     public function setNotificationsOfferMail(bool $notificationsOfferMail): void
  751.     {
  752.         $this->notificationsOfferMail $notificationsOfferMail;
  753.     }
  754.     /** @param bool $notificationsOfferNotification */
  755.     public function setNotificationsOfferNotification(bool $notificationsOfferNotification): void
  756.     {
  757.         $this->notificationsOfferNotification $notificationsOfferNotification;
  758.     }
  759.     /** @return bool */
  760.     public function isNotificationsInquiryMail(): bool
  761.     {
  762.         return $this->notificationsInquiryMail;
  763.     }
  764.     /** @return bool */
  765.     public function isNotificationsInquiryNotification(): bool
  766.     {
  767.         return $this->notificationsInquiryNotification;
  768.     }
  769.     /** @return bool */
  770.     public function isNotificationsInvoiceMail(): bool
  771.     {
  772.         return $this->notificationsInvoiceMail;
  773.     }
  774.     /** @return bool */
  775.     public function isNotificationsInvoiceNotification(): bool
  776.     {
  777.         return $this->notificationsInvoiceNotification;
  778.     }
  779.     /** @return bool */
  780.     public function isNotificationsOfferMail(): bool
  781.     {
  782.         return $this->notificationsOfferMail;
  783.     }
  784.     /** @return bool */
  785.     public function isNotificationsOfferNotification(): bool
  786.     {
  787.         return $this->notificationsOfferNotification;
  788.     }
  789.     /** @param bool $dontShowCompanyNameOtherOffers */
  790.     public function setDontShowCompanyNameOtherOffers(bool $dontShowCompanyNameOtherOffers): void
  791.     {
  792.         $this->dontShowCompanyNameOtherOffers $dontShowCompanyNameOtherOffers;
  793.     }
  794.     /** @return bool */
  795.     public function isDontShowCompanyNameOtherOffers(): bool
  796.     {
  797.         return $this->dontShowCompanyNameOtherOffers;
  798.     }
  799.     /** @return bool */
  800.     public function isIgp(): bool
  801.     {
  802.         return $this->igp;
  803.     }
  804.     /** @param bool $igp */
  805.     public function setIgp(bool $igp): void
  806.     {
  807.         $this->igp $igp;
  808.     }
  809.     /** @return bool */
  810.     public function isShowOnlyRetailPriceAndDeliveryDate(): bool
  811.     {
  812.         return $this->showOnlyRetailPriceAndDeliveryDate;
  813.     }
  814.     /** @param bool $showOnlyRetailPriceAndDeliveryDate */
  815.     public function setShowOnlyRetailPriceAndDeliveryDate(bool $showOnlyRetailPriceAndDeliveryDate): void
  816.     {
  817.         $this->showOnlyRetailPriceAndDeliveryDate $showOnlyRetailPriceAndDeliveryDate;
  818.     }
  819.     /** @return bool */
  820.     public function isCanDeletePrivateMessages(): bool
  821.     {
  822.         return $this->canDeletePrivateMessages;
  823.     }
  824.     /** @param bool $canDeletePrivateMessages */
  825.     public function setCanDeletePrivateMessages(bool $canDeletePrivateMessages): void
  826.     {
  827.         $this->canDeletePrivateMessages $canDeletePrivateMessages;
  828.     }
  829.     /** @return mixed */
  830.     public function getChoosedForInquiries()
  831.     {
  832.         return $this->choosedForInquiries;
  833.     }
  834.     /** @param mixed $choosedForInquiries */
  835.     public function setChoosedForInquiries($choosedForInquiries): void
  836.     {
  837.         $this->choosedForInquiries $choosedForInquiries;
  838.     }
  839.     /** @return bool */
  840.     public function isCanSeeOtherSuppliersOfHisMakes(): bool
  841.     {
  842.         return $this->canSeeOtherSuppliersOfHisMakes;
  843.     }
  844.     /** @param bool $canSeeOtherSuppliersOfHisMakes */
  845.     public function setCanSeeOtherSuppliersOfHisMakes(bool $canSeeOtherSuppliersOfHisMakes): void
  846.     {
  847.         $this->canSeeOtherSuppliersOfHisMakes $canSeeOtherSuppliersOfHisMakes;
  848.     }
  849.     /** @return bool */
  850.     public function isCanGetNotificationsAboutBetterOffer(): bool
  851.     {
  852.         return $this->canGetNotificationsAboutBetterOffer;
  853.     }
  854.     /** @param bool $canGetNotificationsAboutBetterOffer */
  855.     public function setCanGetNotificationsAboutBetterOffer(bool $canGetNotificationsAboutBetterOffer): void
  856.     {
  857.         $this->canGetNotificationsAboutBetterOffer $canGetNotificationsAboutBetterOffer;
  858.     }
  859.     /** @return bool */
  860.     public function isDeliveryForWholeCountry(): bool
  861.     {
  862.         return $this->deliveryForWholeCountry;
  863.     }
  864.     /** @param bool $deliveryForWholeCountry */
  865.     public function setDeliveryForWholeCountry(bool $deliveryForWholeCountry): void
  866.     {
  867.         $this->deliveryForWholeCountry $deliveryForWholeCountry;
  868.     }
  869.     /** @return mixed */
  870.     public function getMessageForCustomer()
  871.     {
  872.         return $this->messageForCustomer;
  873.     }
  874.     /** @param mixed $messageForCustomer */
  875.     public function setMessageForCustomer($messageForCustomer): void
  876.     {
  877.         $this->messageForCustomer $messageForCustomer;
  878.     }
  879.     /** @return bool */
  880.     public function isShowMessageForCustomer(): bool
  881.     {
  882.         return $this->showMessageForCustomer;
  883.     }
  884.     /** @param bool $showMessageForCustomer */
  885.     public function setShowMessageForCustomer(bool $showMessageForCustomer): void
  886.     {
  887.         $this->showMessageForCustomer $showMessageForCustomer;
  888.     }
  889.     /** @return bool */
  890.     public function isWarnSuppliersAboutThisCustomerPayments(): bool
  891.     {
  892.         return $this->warnSuppliersAboutThisCustomerPayments;
  893.     }
  894.     /** @param bool $warnSuppliersAboutThisCustomerPayments */
  895.     public function setWarnSuppliersAboutThisCustomerPayments(bool $warnSuppliersAboutThisCustomerPayments): void
  896.     {
  897.         $this->warnSuppliersAboutThisCustomerPayments $warnSuppliersAboutThisCustomerPayments;
  898.     }
  899.     /** @return bool */
  900.     public function isAvoidUserForCreateNewInquiries(): bool
  901.     {
  902.         return $this->avoidUserForCreateNewInquiries;
  903.     }
  904.     /** @param bool $avoidUserForCreateNewInquiries */
  905.     public function setAvoidUserForCreateNewInquiries(bool $avoidUserForCreateNewInquiries): void
  906.     {
  907.         $this->avoidUserForCreateNewInquiries $avoidUserForCreateNewInquiries;
  908.     }
  909.     /** @return bool */
  910.     public function isShowStatsForSupplier(): bool
  911.     {
  912.         return $this->showStatsForSupplier;
  913.     }
  914.     /** @param bool $showStatsForSupplier */
  915.     public function setShowStatsForSupplier(bool $showStatsForSupplier): void
  916.     {
  917.         $this->showStatsForSupplier $showStatsForSupplier;
  918.     }
  919.     /** @return ?string */
  920.     public function getSupplierCard(): ?string
  921.     {
  922.         return $this->supplierCard;
  923.     }
  924.     /** @param string $supplierCard */
  925.     public function setSupplierCard(?string $supplierCard): void
  926.     {
  927.         $this->supplierCard $supplierCard;
  928.     }
  929.     /** @return mixed */
  930.     public function getSupplierCardShort()
  931.     {
  932.         return $this->supplierCardShort;
  933.     }
  934.     /** @param mixed $supplierCardShort */
  935.     public function setSupplierCardShort($supplierCardShort): void
  936.     {
  937.         $this->supplierCardShort $supplierCardShort;
  938.     }
  939.     /** @return bool */
  940.     public function isSupplierCardActive(): bool
  941.     {
  942.         return $this->supplierCardActive;
  943.     }
  944.     /** @param bool $supplierCardActive */
  945.     public function setSupplierCardActive(bool $supplierCardActive): void
  946.     {
  947.         $this->supplierCardActive $supplierCardActive;
  948.     }
  949.     /** @return bool */
  950.     public function isShowWonOffersTotalValue(): bool
  951.     {
  952.         return $this->showWonOffersTotalValue;
  953.     }
  954.     /** @param bool $showWonOffersTotalValue */
  955.     public function setShowWonOffersTotalValue(bool $showWonOffersTotalValue): void
  956.     {
  957.         $this->showWonOffersTotalValue $showWonOffersTotalValue;
  958.     }
  959.     /** @return bool */
  960.     public function isShowOrderedPartsStats(): bool
  961.     {
  962.         return $this->showOrderedPartsStats;
  963.     }
  964.     /** @param bool $showOrderedPartsStats */
  965.     public function setShowOrderedPartsStats(bool $showOrderedPartsStats): void
  966.     {
  967.         $this->showOrderedPartsStats $showOrderedPartsStats;
  968.     }
  969.     /** @param string|null $lastLogin */
  970.     public function setLastLogin(?string $lastLogin): void
  971.     {
  972.         $this->lastLogin $lastLogin;
  973.     }
  974.     /** @return string|null */
  975.     public function getLastLogin(): ?string
  976.     {
  977.         return $this->lastLogin;
  978.     }
  979.     /** @return string|null */
  980.     public function getLastOrderDate(): ?string
  981.     {
  982.         return $this->lastOrderDate;
  983.     }
  984.     /** @param string|null $lastOrderDate */
  985.     public function setLastOrderDate(?string $lastOrderDate): void
  986.     {
  987.         $this->lastOrderDate $lastOrderDate;
  988.     }
  989.     /** @return string|null */
  990.     public function getLastPeriodOrderValue(): ?string
  991.     {
  992.         return $this->lastPeriodOrderValue;
  993.     }
  994.     /** @param string|null $lastPeriodOrderValue */
  995.     public function setLastPeriodOrderValue(?string $lastPeriodOrderValue): void
  996.     {
  997.         $this->lastPeriodOrderValue $lastPeriodOrderValue;
  998.     }
  999.     /** @return string|null */
  1000.     public function getLastPeriodSellValue(): ?string
  1001.     {
  1002.         return $this->lastPeriodSellValue;
  1003.     }
  1004.     /** @param string|null $lastPeriodSellValue */
  1005.     public function setLastPeriodSellValue(?string $lastPeriodSellValue): void
  1006.     {
  1007.         $this->lastPeriodSellValue $lastPeriodSellValue;
  1008.     }
  1009.     /** @return int|null */
  1010.     public function getLoginCount(): ?int
  1011.     {
  1012.         return $this->loginCount;
  1013.     }
  1014.     /** @param int|null $loginCount */
  1015.     public function setLoginCount(?int $loginCount): void
  1016.     {
  1017.         $this->loginCount $loginCount;
  1018.     }
  1019.     /** @return int|null */
  1020.     public function getInquiriesCount(): ?int
  1021.     {
  1022.         return $this->inquiriesCount;
  1023.     }
  1024.     /** @param int|null $inquiriesCount */
  1025.     public function setInquiriesCount(?int $inquiriesCount): void
  1026.     {
  1027.         $this->inquiriesCount $inquiriesCount;
  1028.     }
  1029.     /** @return int|null */
  1030.     public function getOffersCount(): ?int
  1031.     {
  1032.         return $this->offersCount;
  1033.     }
  1034.     /** @param int|null $offersCount */
  1035.     public function setOffersCount(?int $offersCount): void
  1036.     {
  1037.         $this->offersCount $offersCount;
  1038.     }
  1039.     /** @return bool */
  1040.     public function isRegulationsAccepted(): bool
  1041.     {
  1042.         return $this->regulationsAccepted;
  1043.     }
  1044.     /** @param bool $regulationsAccepted */
  1045.     public function setRegulationsAccepted(bool $regulationsAccepted): void
  1046.     {
  1047.         $this->regulationsAccepted $regulationsAccepted;
  1048.     }
  1049. }