src/Entity/RateTableAssignment.php line 13
<?phpnamespace App\Entity;use App\Enum\RateTableAssignmentType;use App\Repository\RateTableAssignmentRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Gedmo\Timestampable\Traits\TimestampableEntity;#[ORM\Entity(repositoryClass: RateTableAssignmentRepository::class)]class RateTableAssignment{use TimestampableEntity;#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\ManyToOne(inversedBy: 'rateTableAssignments')]private ?RateTable $rateTable = null;#[ORM\ManyToOne(inversedBy: 'rateTableAssignments', fetch: 'EAGER')]private ?User $user = null;#[ORM\ManyToOne(inversedBy: 'rateTableAssignments', fetch: 'EAGER')]private ?Title $title = null;#[ORM\Column(length: 255)]private ?RateTableAssignmentType $type = null;#[ORM\OneToMany(mappedBy: 'rateTableAssignment', targetEntity: RateTableTier::class, cascade: ['persist', 'remove'])]#[ORM\OrderBy(['low' => 'ASC'])]private Collection $rateTableTiers;public function __construct(){$this->rateTableTiers = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getRateTable(): ?RateTable{return $this->rateTable;}public function setRateTable(?RateTable $rateTable): static{$this->rateTable = $rateTable;return $this;}public function getUser(): ?User{return $this->user;}public function setUser(?User $user): static{$this->user = $user;return $this;}public function getTitle(): ?Title{return $this->title;}public function setTitle(?Title $title): static{$this->title = $title;return $this;}public function getType(): ?RateTableAssignmentType{return $this->type;}public function setType(RateTableAssignmentType $type): static{$this->type = $type;return $this;}public function __toString(): string{return (string)$this->type->name;}/*** @return Collection<int, RateTableTier>*/public function getRateTableTiers(): Collection{return $this->rateTableTiers;}public function addRateTableTier(RateTableTier $rateTableTier): static{if (!$this->rateTableTiers->contains($rateTableTier)) {$this->rateTableTiers->add($rateTableTier);$rateTableTier->setRateTableAssignment($this);}return $this;}public function removeRateTableTier(RateTableTier $rateTableTier): static{if ($this->rateTableTiers->removeElement($rateTableTier)) {// set the owning side to null (unless already changed)if ($rateTableTier->getRateTableAssignment() === $this) {$rateTableTier->setRateTableAssignment(null);}}return $this;}}