<?phpnamespace App\Entity;use App\Repository\SmsClientListRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: SmsClientListRepository::class)]class SmsClientList{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[ORM\ManyToOne(targetEntity: AccountingFirm::class, inversedBy: 'smsClientLists')] private ?AccountingFirm $accountingFirm; #[ORM\Column(type: 'string', length: 255)] private ?string $name; #[ORM\Column(type: 'datetime_immutable')] private ?\DateTimeImmutable $createdAt; #[ORM\Column(type: 'datetime_immutable')] private ?\DateTimeImmutable $updatedAt; #[ORM\OneToMany(mappedBy: 'smsClientList', targetEntity: SmsClientListNumber::class, cascade: ['persist', 'remove'])] private $smsClientListNumbers; #[ORM\OneToMany(mappedBy: 'diffusionList', targetEntity: SmsClientCampaign::class)] private $campaigns; public function __construct() { $this->smsClientListNumbers = new ArrayCollection(); $this->campaigns = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getAccountingFirm(): ?AccountingFirm { return $this->accountingFirm; } public function setAccountingFirm(?AccountingFirm $accountingFirm): self { $this->accountingFirm = $accountingFirm; return $this; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; } public function setCreatedAt(\DateTimeImmutable $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeImmutable { return $this->updatedAt; } public function setUpdatedAt(\DateTimeImmutable $updatedAt): self { $this->updatedAt = $updatedAt; return $this; } /** * @return Collection<int, SmsClientListNumber> */ public function getSmsClientListNumbers(): Collection { return $this->smsClientListNumbers; } public function addSmsClientListNumber(SmsClientListNumber $smsClientListNumber): self { if (!$this->smsClientListNumbers->contains($smsClientListNumber)) { $this->smsClientListNumbers[] = $smsClientListNumber; $smsClientListNumber->setSmsClientList($this); } return $this; } public function removeSmsClientListNumber(SmsClientListNumber $smsClientListNumber): self { if ($this->smsClientListNumbers->removeElement($smsClientListNumber)) { // set the owning side to null (unless already changed) if ($smsClientListNumber->getSmsClientList() === $this) { $smsClientListNumber->setSmsClientList(null); } } return $this; } /** * @return Collection<int, SmsClientCampaign> */ public function getCampaigns(): Collection { return $this->campaigns; } public function addCampaign(SmsClientCampaign $campaign): self { if (!$this->campaigns->contains($campaign)) { $this->campaigns[] = $campaign; $campaign->setDiffusionList($this); } return $this; } public function removeCampaign(SmsClientCampaign $campaign): self { if ($this->campaigns->removeElement($campaign)) { // set the owning side to null (unless already changed) if ($campaign->getDiffusionList() === $this) { $campaign->setDiffusionList(null); } } return $this; }}