<?phpnamespace App\Entity\GroupTicket;use App\Entity\Tu;use App\Entity\User;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Validator\Constraints as Assert;#[ORM\Entity]class TransportCompany extends User{ #[ORM\Column(length: 255)] #[Assert\NotBlank] private string $name = ''; #[ORM\OneToMany(mappedBy: 'transportCompany', targetEntity: School::class, cascade: ["all"])] private Collection $schools; #[ORM\Column] private ?bool $allowedEditPriceList = null; #[ORM\ManyToMany(targetEntity: PublicConnection::class, inversedBy: 'transportCompanies')] private Collection $publicConnections; #[ORM\Column(length: 255)] #[Assert\NotBlank] private ?string $productNumber = null; #[ORM\Column(length: 255)] #[Assert\NotBlank] private ?string $tuNumber = null; #[ORM\Column(length: 255)] #[Assert\NotBlank] private ?string $taxNumber = null; #[ORM\Column(length: 255)] #[Assert\NotBlank] private ?string $productTitle = null; #[ORM\Column(length: 255, nullable: true)] private ?string $abbrevation = null; #[ORM\Column(length: 255, nullable: true)] private ?string $productLimitation = null; #[ORM\Column] #[Assert\NotBlank] private ?int $groupTicketClass = null; #[ORM\Column(length: 255)] #[Assert\NotBlank] private ?string $groupTicketSegment = null; #[ORM\Column(length: 255)] private ?string $groupTicketFqCode = null; #[ORM\Column(length: 255, nullable: true)] private ?string $footerTemplate = null; // Minimal group size (per transport company/verbund) #[ORM\Column(nullable: true)] private ?int $groupTicketMinSize = null; public function __construct() { parent::__construct(); $this->schools = new ArrayCollection(); $this->publicConnections = new ArrayCollection(); } public function getGroupTicketMinSize(): ?int { return $this->groupTicketMinSize; } public function setGroupTicketMinSize(?int $groupTicketMinSize): static { $this->groupTicketMinSize = $groupTicketMinSize; return $this; } public function getName(): string { return $this->name; } public function setName(string $name): static { $this->name = $name; return $this; } /** * @return Collection<int, School> */ public function getSchools(): Collection { return $this->schools; } public function addSchool(School $school): static { if (!$this->schools->contains($school)) { $this->schools->add($school); $school->setTransportCompany($this); } return $this; } public function removeSchool(School $school): static { if ($this->schools->removeElement($school)) { // set the owning side to null (unless already changed) if ($school->getTransportCompany() === $this) { $school->setTransportCompany(null); } } return $this; } public function isAllowedEditPriceList(): ?bool { return $this->allowedEditPriceList; } public function setAllowedEditPriceList(bool $allowedEditPriceList): static { $this->allowedEditPriceList = $allowedEditPriceList; return $this; } /** * @return Collection<int, PublicConnection> */ public function getPublicConnections(): Collection { return $this->publicConnections; } public function addPublicConnection(PublicConnection $publicConnection): static { if (!$this->publicConnections->contains($publicConnection)) { $this->publicConnections->add($publicConnection); } return $this; } public function removePublicConnection(PublicConnection $publicConnection): static { $this->publicConnections->removeElement($publicConnection); return $this; } public function getProductNumber(): ?string { return $this->productNumber; } public function setProductNumber(string $productNumber): static { $this->productNumber = $productNumber; return $this; } public function getTuNumber(): ?string { return $this->tuNumber; } public function setTuNumber(string $tuNumber): static { $this->tuNumber = $tuNumber; return $this; } public function getTaxNumber(): ?string { return $this->taxNumber; } public function setTaxNumber(string $taxNumber): static { $this->taxNumber = $taxNumber; return $this; } public function getProductTitle(): ?string { return $this->productTitle; } public function setProductTitle(string $productTitle): static { $this->productTitle = $productTitle; return $this; } public function getAbbrevation(): ?string { return $this->abbrevation; } public function setAbbrevation(?string $abbrevation): static { $this->abbrevation = $abbrevation; return $this; } public function getProductLimitation(): ?string { return $this->productLimitation; } public function setProductLimitation(?string $productLimitation): static { $this->productLimitation = $productLimitation; return $this; } public function getGroupTicketClass(): ?int { return $this->groupTicketClass; } public function setGroupTicketClass(int $groupTicketClass): static { $this->groupTicketClass = $groupTicketClass; return $this; } public function getGroupTicketSegment(): ?string { return $this->groupTicketSegment; } public function setGroupTicketSegment(string $groupTicketSegment): static { $this->groupTicketSegment = $groupTicketSegment; return $this; } public function getGroupTicketFqCode(): ?string { return $this->groupTicketFqCode; } public function setGroupTicketFqCode(string $groupTicketFqCode): static { $this->groupTicketFqCode = $groupTicketFqCode; return $this; } public function getFooterTemplate(): ?string { return $this->footerTemplate; } public function setFooterTemplate(?string $footerTemplate): static { $this->footerTemplate = $footerTemplate; return $this; }}