src/Entity/Accounts.php line 38

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