src/Entity/Accounts.php line 45

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\AccountsRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use ApiPlatform\Metadata\ApiFilter;
  10. use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
  11. use Symfony\Component\Serializer\Annotation\Groups;
  12. use Symfony\Component\Serializer\Annotation\MaxDepth;
  13. use ApiPlatform\Core\Annotation\ApiProperty;
  14. use App\Filter\DeletedFilter
  15. use ApiPlatform\Doctrine\Orm\Filter\OrderFilter;
  16.  
  17. #[ORM\Entity(repositoryClassAccountsRepository::class)]
  18. #[ApiResource(
  19.     normalizationContext: ['groups' => ['account:read']],
  20.     denormalizationContext: ['groups' => ['account:write']],
  21.     order: ['name' => 'DESC'],
  22. )]
  23. #[ApiFilter(SearchFilter::class, properties: [
  24.     'name' => 'ipartial'
  25.     'code1c' => 'exact',
  26.     'edrpou' => 'exact'
  27.     'user.id' => 'exact'
  28.     'manager.id' => 'exact'
  29.     'manager.firstName' => 'ipartial',
  30.     'phone' => 'exact',
  31.     'accountJobsLists.id' => 'exact',
  32.     'accountJobsLists.name' => 'exact',
  33.     'accountJobsLists.status' => 'exact',
  34.     ])]
  35. #[ApiFilter(DeletedFilter::class)]
  36. #[ApiFilter(OrderFilter::class, properties: ['user.loginCount''user.lastLogin'], arguments: ['orderParameterName' => 'order'])]
  37. class Accounts
  38. {
  39.     #[ORM\Id]
  40.     #[ORM\GeneratedValue]
  41.     #[ORM\Column]
  42.     #[Groups(['account:read''order:read''order_product:read''pre_order_product:read''pre_order:read''load_invoice:read''load_invocie:read''read''account:write''write''agreements:read''user:read''job:read''worker:read''account_job:read''account_worker:read'])]
  43.     private ?int $id null;
  44.     #[ORM\Column(length255)]
  45.     #[Groups(['account:read''order:read''order_product:read''pre_order_product:read''pre_order:read''load_invoice:read''load_invocie:read''read''account:write''write''agreements:read''user:read''job:read''worker:read''account_job:read''account_worker:read'])]
  46.     private ?string $name null;
  47.     #[Groups(['account:read''read''account:write''write'])]
  48.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  49.     private ?\DateTimeInterface $date_entered null;
  50.     #[Groups(['account:read''read''account:write''write'])]
  51.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  52.     private ?\DateTimeInterface $date_modified null;
  53.     #[Groups(['account:read''read''account:write''write'])]
  54.     #[ORM\Column(nullabletrue)]
  55.     private ?int $modified_user_id null;
  56.     #[Groups(['account:read''read''account:write''write'])]
  57.     #[ORM\Column(nullabletrue)]
  58.     private ?int $created_by null;
  59.     #[Groups(['account:read''read''account:write''write'])]
  60.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  61.     private ?string $description null;
  62.     #[Groups(['account:read''account:write'])]
  63.     #[ORM\Column(nullabletrueoptions: ["default" => false])]
  64.     private ?bool $deleted null;
  65.     #[Groups(['account:read''read''account:write''write'])]
  66.     #[ORM\Column(nullabletrue)]
  67.     private ?int $assigned_user_id null;
  68.     #[Groups(['account:read''read''account:write''write''user:read''account_job:read''account_worker:read'])]
  69.     #[ORM\Column(length100nullabletrue)]
  70.     private ?string $edrpou null;
  71.     #[Groups(['account:read''read''account:write''write''user:read'])]
  72.     #[ORM\Column(length255nullabletrue)]
  73.     private ?string $billing_address_city null;
  74.     #[Groups(['account:read''read''account:write''write''user:read'])]
  75.     #[ORM\Column(length255nullabletrue)]
  76.     private ?string $billing_address_state null;
  77.     #[Groups(['account:read''read''account:write''write''user:read'])]
  78.     #[ORM\Column(length255nullabletrue)]
  79.     private ?string $billing_address_country null;
  80.     #[Groups(['account:read''read''account:write''write''user:read'])]
  81.     #[ORM\Column(length255nullabletrue)]
  82.     private ?string $billing_address_street null;
  83.     #[Groups(['account:read''read''account:write''write''user:read'])]
  84.     #[ORM\Column(length50nullabletrue)]
  85.     private ?string $phone null;
  86.     #[Groups(['read''account:write''write'])]
  87.     #[ORM\OneToMany(mappedBy'account'targetEntityOrders::class, cascade:['persist''remove'])]
  88.     private Collection $orders;
  89.     #[MaxDepth(1)]
  90.     #[ApiProperty(writabletrue)]
  91.     #[ORM\ManyToOne(inversedBy'accounts')]
  92.     #[Groups(['account:read''account:write''write'])]
  93.     private ?User $user null;
  94.     #[Groups(['read''account:write''write'])]
  95.     #[ORM\OneToMany(mappedBy'supplier'targetEntityIncomingInvoice::class, cascade:['persist''remove'])]
  96.     private Collection $invoice_supplier;
  97.     #[Groups(['account:read''read''account:write''write''user:read'])]
  98.     #[ORM\Column(length100nullabletrue)]
  99.     private ?string $ipn null;
  100.     #[Groups(['account:read''read''account:write''write''user:read'])]
  101.     #[ORM\Column(length20nullabletrue)]
  102.     private ?string $type null;
  103.     #[MaxDepth(1)]
  104.     #[Groups(['account:read''read''account:write''write'])]
  105.     #[ORM\ManyToOne(targetEntityself::class, inversedBy'accounts')]
  106.     private ?self $parent null;
  107.     #[Groups(['account:write'])]
  108.     #[MaxDepth(2)]
  109.     #[ORM\OneToMany(mappedBy'parent'targetEntityself::class)]
  110.     private Collection $accounts;
  111.     #[Groups(['account:read''read''account:write''write'])]
  112.     #[ORM\Column(length100nullabletrue)]
  113.     private ?string $director null;
  114.     #[Groups(['account:read''order:read''order_product:read''pre_order_product:read''pre_order:read''load_invoice:read''load_invocie:read''read''account:write''write''user:read''worker:read''job:read''account_job:read''account_worker:read'])]
  115.     #[ORM\Column(length20nullabletrue)]
  116.     private ?string $code1c '';
  117.     #[Groups(['account:read''read''account:write''write'])]
  118.     #[ORM\OneToMany(mappedBy'account'targetEntityContacts::class, cascade:['persist''remove'])]
  119.     private Collection $contacts;
  120.     #[MaxDepth(1)]
  121.     #[ORM\ManyToOne(inversedBy'managerAccounts')]
  122.     #[Groups(['account:read''account:write''order:read',  'pre_order:read'])]
  123.     private ?User $manager null;
  124.     #[Groups(['read''account:write''write'])]
  125.     #[MaxDepth(2)]
  126.     #[ORM\OneToMany(mappedBy'account'targetEntityPreOrder::class)]
  127.     private Collection $preOrders;
  128.     #[ORM\OneToMany(mappedBy'account'targetEntityLoadInvoice::class)]
  129.     private Collection $loadInvoices;
  130.     #[ORM\OneToMany(mappedBy'organization'targetEntityAgreements::class)]
  131.     private Collection $organization;
  132.     #[Groups(['account:read''read''account:write''write','user:read''worker:read''job:read'])]
  133.     #[ORM\OneToMany(mappedBy'account'targetEntityAgreements::class, cascade:['persist''remove'])]
  134.     private Collection $agreements;
  135.     #[Groups(['account:read''account:write'])]
  136.     #[ORM\ManyToOne(inversedBy'accounts')]
  137.     private ?Agreements $virtualAgreementSpecfication null;
  138.     #[Groups(['account:read''account:write'])]
  139.     #[ORM\OneToMany(mappedBy'account'targetEntityAccountAddress::class)]
  140.     private Collection $accountAddresses;
  141.     #[ORM\OneToMany(mappedBy'account'targetEntityAccountWorker::class, orphanRemovaltrue)]
  142.     private Collection $accountWorkers;
  143.     #[ORM\OneToMany(mappedBy'account'targetEntityJobs::class)]
  144.     private Collection $jobs;
  145.     #[ORM\OneToMany(mappedBy'account'targetEntityAccountJobsList::class)]
  146.     private Collection $accountJobsLists;
  147.     #[Groups(['account:read'])]
  148.     #[ORM\OneToMany(mappedBy'carriers'targetEntityOrders::class)]
  149.     private Collection $orderCarrier;
  150.     #[Groups(['account:read''account:write''order:read',  'pre_order:read'])]
  151.     #[ORM\Column(nullabletrue)]
  152.     private ?float $maxBorg null;
  153.     #[Groups(['account:read''account:write''order:read',  'pre_order:read'])]
  154.     #[ORM\Column(nullabletrue)]
  155.     private ?int $dayDelay null;
  156.     public function __construct()
  157.     {
  158.         $this->orders = new ArrayCollection();
  159.         $this->invoice_supplier = new ArrayCollection();
  160.         $this->accounts = new ArrayCollection();
  161.         $this->contacts = new ArrayCollection();
  162.         $this->preOrders = new ArrayCollection();
  163.         $this->loadInvoices = new ArrayCollection();
  164.         $this->organization = new ArrayCollection();
  165.         $this->agreements = new ArrayCollection();
  166.         $this->accountAddresses = new ArrayCollection();
  167.         $this->accountWorkers = new ArrayCollection();
  168.         $this->jobs = new ArrayCollection();
  169.         $this->accountJobsLists = new ArrayCollection();
  170.         $this->orderCarrier = new ArrayCollection();
  171.     }
  172.     public function getId(): ?int
  173.     {
  174.         return $this->id;
  175.     }
  176.     public function getName(): ?string
  177.     {
  178.         return $this->name;
  179.     }
  180.     public function setName(string $name): self
  181.     {
  182.         $this->name $name;
  183.         return $this;
  184.     }
  185.     public function getDateEntered(): ?\DateTimeInterface
  186.     {
  187.         return $this->date_entered;
  188.     }
  189.     public function setDateEntered(?\DateTimeInterface $date_entered): self
  190.     {
  191.         $this->date_entered $date_entered;
  192.         return $this;
  193.     }
  194.     public function getDateModified(): ?\DateTimeInterface
  195.     {
  196.         return $this->date_modified;
  197.     }
  198.     public function setDateModified(?\DateTimeInterface $date_modified): self
  199.     {
  200.         $this->date_modified $date_modified;
  201.         return $this;
  202.     }
  203.     public function getModifiedUserId(): ?int
  204.     {
  205.         return $this->modified_user_id;
  206.     }
  207.     public function setModifiedUserId(?int $modified_user_id): self
  208.     {
  209.         $this->modified_user_id $modified_user_id;
  210.         return $this;
  211.     }
  212.     public function getCreatedBy(): ?int
  213.     {
  214.         return $this->created_by;
  215.     }
  216.     public function setCreatedBy(int $created_by): self
  217.     {
  218.         $this->created_by $created_by;
  219.         return $this;
  220.     }
  221.     public function getDescription(): ?string
  222.     {
  223.         return $this->description;
  224.     }
  225.     public function setDescription(?string $description): self
  226.     {
  227.         $this->description $description;
  228.         return $this;
  229.     }
  230.     public function getDeleted(): ?int
  231.     {
  232.         return $this->deleted;
  233.     }
  234.     public function setDeleted(?int $deleted): self
  235.     {
  236.         $this->deleted $deleted;
  237.         return $this;
  238.     }
  239.     public function getAssignedUserId(): ?int
  240.     {
  241.         return $this->assigned_user_id;
  242.     }
  243.     public function setAssignedUserId(?int $assigned_user_id): self
  244.     {
  245.         $this->assigned_user_id $assigned_user_id;
  246.         return $this;
  247.     }
  248.     public function getEdrpou(): ?string
  249.     {
  250.         return $this->edrpou;
  251.     }
  252.     public function setEdrpou(?string $edrpou): self
  253.     {
  254.         $this->edrpou $edrpou;
  255.         return $this;
  256.     }
  257.     public function getBillingAddressCity(): ?string
  258.     {
  259.         return $this->billing_address_city;
  260.     }
  261.     public function setBillingAddressCity(?string $billing_address_city): self
  262.     {
  263.         $this->billing_address_city $billing_address_city;
  264.         return $this;
  265.     }
  266.     public function getBillingAddressState(): ?string
  267.     {
  268.         return $this->billing_address_state;
  269.     }
  270.     public function setBillingAddressState(?string $billing_address_state): self
  271.     {
  272.         $this->billing_address_state $billing_address_state;
  273.         return $this;
  274.     }
  275.     public function getBillingAddressCountry(): ?string
  276.     {
  277.         return $this->billing_address_country;
  278.     }
  279.     public function setBillingAddressCountry(?string $billing_address_country): self
  280.     {
  281.         $this->billing_address_country $billing_address_country;
  282.         return $this;
  283.     }
  284.     public function getBillingAddressStreet(): ?string
  285.     {
  286.         return $this->billing_address_street;
  287.     }
  288.     public function setBillingAddressStreet(?string $billing_address_street): self
  289.     {
  290.         $this->billing_address_street $billing_address_street;
  291.         return $this;
  292.     }
  293.     public function getPhone(): ?string
  294.     {
  295.         return $this->phone;
  296.     }
  297.     public function setPhone(?string $phone): self
  298.     {
  299.         $this->phone $phone;
  300.         return $this;
  301.     }
  302.     /**
  303.      * @return Collection<int, Orders>
  304.      */
  305.     public function getOrders(): Collection
  306.     {
  307.         return $this->orders;
  308.     }
  309.     public function addOrder(Orders $order): self
  310.     {
  311.         if (!$this->orders->contains($order)) {
  312.             $this->orders->add($order);
  313.             $order->setAccountId($this);
  314.         }
  315.         return $this;
  316.     }
  317.     public function removeOrder(Orders $order): self
  318.     {
  319.         if ($this->orders->removeElement($order)) {
  320.             // set the owning side to null (unless already changed)
  321.             if ($order->getAccountId() === $this) {
  322.                 $order->setAccountId(null);
  323.             }
  324.         }
  325.         return $this;
  326.     }
  327.     public function getUser(): ?User
  328.     {
  329.         return $this->user;
  330.     }
  331.     public function setUser(?User $user): self
  332.     {
  333.         $this->user $user;
  334.         return $this;
  335.     }
  336.     /**
  337.      * @return Collection<int, IncomingInvoice>
  338.      */
  339.     public function getInvoiceSupplier(): Collection
  340.     {
  341.         return $this->invoice_supplier;
  342.     }
  343.     public function addInvoiceSupplier(IncomingInvoice $invoiceSupplier): self
  344.     {
  345.         if (!$this->invoice_supplier->contains($invoiceSupplier)) {
  346.             $this->invoice_supplier->add($invoiceSupplier);
  347.             $invoiceSupplier->setSupplier($this);
  348.         }
  349.         return $this;
  350.     }
  351.     public function removeInvoiceSupplier(IncomingInvoice $invoiceSupplier): self
  352.     {
  353.         if ($this->invoice_supplier->removeElement($invoiceSupplier)) {
  354.             // set the owning side to null (unless already changed)
  355.             if ($invoiceSupplier->getSupplier() === $this) {
  356.                 $invoiceSupplier->setSupplier(null);
  357.             }
  358.         }
  359.         return $this;
  360.     }
  361.     public function getIpn(): ?string
  362.     {
  363.         return $this->ipn;
  364.     }
  365.     public function setIpn(?string $ipn): self
  366.     {
  367.         $this->ipn $ipn;
  368.         return $this;
  369.     }
  370.     public function getType(): ?string
  371.     {
  372.         return $this->type;
  373.     }
  374.     public function setType(?string $type): self
  375.     {
  376.         $this->type $type;
  377.         return $this;
  378.     }
  379.     public function getParent(): ?self
  380.     {
  381.         return $this->parent;
  382.     }
  383.     public function setParent(?self $parent): self
  384.     {
  385.         $this->parent $parent;
  386.         return $this;
  387.     }
  388.     /**
  389.      * @return Collection<int, self>
  390.      */
  391.     public function getAccounts(): Collection
  392.     {
  393.         return $this->accounts;
  394.     }
  395.     public function addAccount(self $account): self
  396.     {
  397.         if (!$this->accounts->contains($account)) {
  398.             $this->accounts->add($account);
  399.             $account->setParent($this);
  400.         }
  401.         return $this;
  402.     }
  403.     public function removeAccount(self $account): self
  404.     {
  405.         if ($this->accounts->removeElement($account)) {
  406.             // set the owning side to null (unless already changed)
  407.             if ($account->getParent() === $this) {
  408.                 $account->setParent(null);
  409.             }
  410.         }
  411.         return $this;
  412.     }
  413.     public function getDirector(): ?string
  414.     {
  415.         return $this->director;
  416.     }
  417.     public function setDirector(?string $director): self
  418.     {
  419.         $this->director $director;
  420.         return $this;
  421.     }
  422.     public function getCode1c(): ?string
  423.     {
  424.         return $this->code1c;
  425.     }
  426.     public function setCode1c(?string $code1c): self
  427.     {
  428.         $this->code1c $code1c;
  429.         return $this;
  430.     }
  431.     /**
  432.      * @return Collection<int, Contacts>
  433.      */
  434.     public function getContacts(): Collection
  435.     {
  436.         return $this->contacts;
  437.     }
  438.     public function addContact(Contacts $contact): self
  439.     {
  440.         if (!$this->contacts->contains($contact)) {
  441.             $this->contacts->add($contact);
  442.             $contact->setAccount($this);
  443.         }
  444.         return $this;
  445.     }
  446.     public function removeContact(Contacts $contact): self
  447.     {
  448.         if ($this->contacts->removeElement($contact)) {
  449.             // set the owning side to null (unless already changed)
  450.             if ($contact->getAccount() === $this) {
  451.                 $contact->setAccount(null);
  452.             }
  453.         }
  454.         return $this;
  455.     }
  456.     public function getManager(): ?User
  457.     {
  458.         return $this->manager;
  459.     }
  460.     public function setManager(?User $manager): self
  461.     {
  462.         $this->manager $manager;
  463.         return $this;
  464.     }
  465.     /**
  466.      * @return Collection<int, PreOrder>
  467.      */
  468.     public function getPreOrders(): Collection
  469.     {
  470.         return $this->preOrders;
  471.     }
  472.     public function addPreOrder(PreOrder $preOrder): self
  473.     {
  474.         if (!$this->preOrders->contains($preOrder)) {
  475.             $this->preOrders->add($preOrder);
  476.             $preOrder->setAccount($this);
  477.         }
  478.         return $this;
  479.     }
  480.     public function removePreOrder(PreOrder $preOrder): self
  481.     {
  482.         if ($this->preOrders->removeElement($preOrder)) {
  483.             // set the owning side to null (unless already changed)
  484.             if ($preOrder->getAccount() === $this) {
  485.                 $preOrder->setAccount(null);
  486.             }
  487.         }
  488.         return $this;
  489.     }
  490.     /**
  491.      * @return Collection<int, LoadInvoice>
  492.      */
  493.     public function getLoadInvoices(): Collection
  494.     {
  495.         return $this->loadInvoices;
  496.     }
  497.     public function addLoadInvoice(LoadInvoice $loadInvoice): self
  498.     {
  499.         if (!$this->loadInvoices->contains($loadInvoice)) {
  500.             $this->loadInvoices->add($loadInvoice);
  501.             $loadInvoice->setAccount($this);
  502.         }
  503.         return $this;
  504.     }
  505.     public function removeLoadInvoice(LoadInvoice $loadInvoice): self
  506.     {
  507.         if ($this->loadInvoices->removeElement($loadInvoice)) {
  508.             // set the owning side to null (unless already changed)
  509.             if ($loadInvoice->getAccount() === $this) {
  510.                 $loadInvoice->setAccount(null);
  511.             }
  512.         }
  513.         return $this;
  514.     }
  515.     /**
  516.      * @return Collection<int, Agreements>
  517.      */
  518.     public function getOrganization(): Collection
  519.     {
  520.         return $this->organization;
  521.     }
  522.     public function addOrganization(Agreements $organization): self
  523.     {
  524.         if (!$this->organization->contains($organization)) {
  525.             $this->organization->add($organization);
  526.             $organization->setOrganization($this);
  527.         }
  528.         return $this;
  529.     }
  530.     public function removeOrganization(Agreements $organization): self
  531.     {
  532.         if ($this->organization->removeElement($organization)) {
  533.             // set the owning side to null (unless already changed)
  534.             if ($organization->getOrganization() === $this) {
  535.                 $organization->setOrganization(null);
  536.             }
  537.         }
  538.         return $this;
  539.     }
  540.     /**
  541.      * @return Collection<int, Agreements>
  542.      */
  543.     public function getAgreements(): Collection
  544.     {
  545.         return $this->agreements;
  546.     }
  547.     public function addAgreement(Agreements $agreement): self
  548.     {
  549.         if (!$this->agreements->contains($agreement)) {
  550.             $this->agreements->add($agreement);
  551.             $agreement->setAccount($this);
  552.         }
  553.         return $this;
  554.     }
  555.     public function removeAgreement(Agreements $agreement): self
  556.     {
  557.         if ($this->agreements->removeElement($agreement)) {
  558.             // set the owning side to null (unless already changed)
  559.             if ($agreement->getAccount() === $this) {
  560.                 $agreement->setAccount(null);
  561.             }
  562.         }
  563.         return $this;
  564.     }
  565.     public function getVirtualAgreementSpecfication(): ?Agreements
  566.     {
  567.         return $this->virtualAgreementSpecfication;
  568.     }
  569.     public function setVirtualAgreementSpecfication(?Agreements $virtualAgreementSpecfication): static
  570.     {
  571.         $this->virtualAgreementSpecfication $virtualAgreementSpecfication;
  572.         return $this;
  573.     }
  574.     /**
  575.      * @return Collection<int, AccountAddress>
  576.      */
  577.     public function getAccountAddresses(): Collection
  578.     {
  579.         return $this->accountAddresses;
  580.     }
  581.     public function addAccountAddress(AccountAddress $accountAddress): self
  582.     {
  583.         if (!$this->accountAddresses->contains($accountAddress)) {
  584.             $this->accountAddresses->add($accountAddress);
  585.             $accountAddress->setAccount($this);
  586.         }
  587.         return $this;
  588.     }
  589.     public function removeAccountAddress(AccountAddress $accountAddress): self
  590.     {
  591.         if ($this->accountAddresses->removeElement($accountAddress)) {
  592.             // set the owning side to null (unless already changed)
  593.             if ($accountAddress->getAccount() === $this) {
  594.                 $accountAddress->setAccount(null);
  595.             }
  596.         }
  597.         return $this;
  598.     }
  599.     /**
  600.      * @return Collection<int, AccountWorker>
  601.      */
  602.     public function getAccountWorkers(): Collection
  603.     {
  604.         return $this->accountWorkers;
  605.     }
  606.     public function addAccountWorker(AccountWorker $accountWorker): self
  607.     {
  608.         if (!$this->accountWorkers->contains($accountWorker)) {
  609.             $this->accountWorkers->add($accountWorker);
  610.             $accountWorker->setAccount($this);
  611.         }
  612.         return $this;
  613.     }
  614.     public function removeAccountWorker(AccountWorker $accountWorker): self
  615.     {
  616.         if ($this->accountWorkers->removeElement($accountWorker)) {
  617.             // set the owning side to null (unless already changed)
  618.             if ($accountWorker->getAccount() === $this) {
  619.                 $accountWorker->setAccount(null);
  620.             }
  621.         }
  622.         return $this;
  623.     }
  624.     /**
  625.      * @return Collection<int, Jobs>
  626.      */
  627.     public function getJobs(): Collection
  628.     {
  629.         return $this->jobs;
  630.     }
  631.     public function addJob(Jobs $job): self
  632.     {
  633.         if (!$this->jobs->contains($job)) {
  634.             $this->jobs->add($job);
  635.             $job->setAccount($this);
  636.         }
  637.         return $this;
  638.     }
  639.     public function removeJob(Jobs $job): self
  640.     {
  641.         if ($this->jobs->removeElement($job)) {
  642.             // set the owning side to null (unless already changed)
  643.             if ($job->getAccount() === $this) {
  644.                 $job->setAccount(null);
  645.             }
  646.         }
  647.         return $this;
  648.     }
  649.     /**
  650.      * @return Collection<int, AccountJobsList>
  651.      */
  652.     public function getAccountJobsLists(): Collection
  653.     {
  654.         return $this->accountJobsLists;
  655.     }
  656.     public function addAccountJobsList(AccountJobsList $accountJobsList): self
  657.     {
  658.         if (!$this->accountJobsLists->contains($accountJobsList)) {
  659.             $this->accountJobsLists->add($accountJobsList);
  660.             $accountJobsList->setAccount($this);
  661.         }
  662.         return $this;
  663.     }
  664.     public function removeAccountJobsList(AccountJobsList $accountJobsList): self
  665.     {
  666.         if ($this->accountJobsLists->removeElement($accountJobsList)) {
  667.             // set the owning side to null (unless already changed)
  668.             if ($accountJobsList->getAccount() === $this) {
  669.                 $accountJobsList->setAccount(null);
  670.             }
  671.         }
  672.         return $this;
  673.     }
  674.     /**
  675.      * @return Collection<int, Orders>
  676.      */
  677.     public function getOrderCarrier(): Collection
  678.     {
  679.         return $this->orderCarrier;
  680.     }
  681.     public function addOrderCarrier(Orders $orderCarrier): static
  682.     {
  683.         if (!$this->orderCarrier->contains($orderCarrier)) {
  684.             $this->orderCarrier->add($orderCarrier);
  685.             $orderCarrier->setCarriers($this);
  686.         }
  687.         return $this;
  688.     }
  689.     
  690.     public function getMaxBorg(): ?float
  691.     {
  692.         return $this->maxBorg;
  693.     }
  694.     public function setMaxBorg(?float $maxBorg): static
  695.     {
  696.         $this->maxBorg $maxBorg;
  697.         return $this;
  698.     }
  699.     public function removeOrderCarrier(Orders $orderCarrier): static
  700.     {
  701.         if ($this->orderCarrier->removeElement($orderCarrier)) {
  702.             // set the owning side to null (unless already changed)
  703.             if ($orderCarrier->getCarriers() === $this) {
  704.                 $orderCarrier->setCarriers(null);
  705.             }
  706.         }
  707.         return $this;
  708.     }
  709.     public function getDayDelay(): ?int
  710.     {
  711.         return $this->dayDelay;
  712.     }
  713.     public function setDayDelay(?int $dayDelay): static
  714.     {
  715.         $this->dayDelay $dayDelay;
  716.         return $this;
  717.     }
  718. }