start working on pair documents
This commit is contained in:
parent
d038599ebf
commit
1cdd3e0bf0
|
@ -107,6 +107,13 @@ class HesabdariDoc
|
||||||
#[ORM\ManyToOne(inversedBy: 'hesabdariDocs')]
|
#[ORM\ManyToOne(inversedBy: 'hesabdariDocs')]
|
||||||
private ?Person $salesman = null;
|
private ?Person $salesman = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Collection<int, self>
|
||||||
|
*/
|
||||||
|
#[ORM\ManyToMany(targetEntity: self::class)]
|
||||||
|
#[ORM\JoinTable(name: 'pairDoc')]
|
||||||
|
private Collection $pairDoc;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->hesabdariRows = new ArrayCollection();
|
$this->hesabdariRows = new ArrayCollection();
|
||||||
|
@ -115,6 +122,7 @@ class HesabdariDoc
|
||||||
$this->storeroomTickets = new ArrayCollection();
|
$this->storeroomTickets = new ArrayCollection();
|
||||||
$this->logs = new ArrayCollection();
|
$this->logs = new ArrayCollection();
|
||||||
$this->notes = new ArrayCollection();
|
$this->notes = new ArrayCollection();
|
||||||
|
$this->pairDoc = new ArrayCollection();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
|
@ -535,4 +543,28 @@ class HesabdariDoc
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Collection<int, self>
|
||||||
|
*/
|
||||||
|
public function getPairDoc(): Collection
|
||||||
|
{
|
||||||
|
return $this->pairDoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function addPairDoc(self $pairDoc): static
|
||||||
|
{
|
||||||
|
if (!$this->pairDoc->contains($pairDoc)) {
|
||||||
|
$this->pairDoc->add($pairDoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removePairDoc(self $pairDoc): static
|
||||||
|
{
|
||||||
|
$this->pairDoc->removeElement($pairDoc);
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue