<?phpnamespace App\Entity;use App\Entity\Traits\Sortable;use App\Entity\Traits\Timestampable;use App\Repository\EnvelopeRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: EnvelopeRepository::class)]class Envelope{ use Timestampable; use Sortable; #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[ORM\Column(type: 'string', length: 100)] private $name; #[ORM\Column(type: 'smallint')] private $capacity; #[ORM\Column(type: 'boolean')] private $isShown = true; #[ORM\Column(type: 'boolean')] private $isDeposited = false; #[ORM\Column(type: 'boolean')] private $isExcluded = false; #[ORM\OneToMany(mappedBy: 'envelope', targetEntity: Check::class)] private $checks; #[ORM\ManyToOne(targetEntity: Season::class, inversedBy: 'envelopes')] private $season; public function __construct() { $this->checks = new ArrayCollection(); } public function __clone() { $this->createdAt = null; $this->updatedAt = null; $this->id = null; $this->position = -1; $this->checks = new ArrayCollection(); $this->setSeason(null); $this->isDeposited = false; $this->isExcluded = false; } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getCapacity(): ?int { return $this->capacity; } public function setCapacity(int $capacity): self { $this->capacity = $capacity; return $this; } public function getIsShown(): ?bool { return $this->isShown; } public function setIsShown(bool $isShown): self { $this->isShown = $isShown; return $this; } public function getIsDeposited(): ?bool { return $this->isDeposited; } public function setIsDeposited(bool $isDeposited): self { $this->isDeposited = $isDeposited; return $this; } public function getIsExcluded(): ?bool { return $this->isExcluded; } public function setIsExcluded(bool $isExcluded): self { $this->isExcluded = $isExcluded; return $this; } /** * @return Collection<int, Check> */ public function getChecks(): Collection { return $this->checks; } public function addCheck(Check $check): self { if (!$this->checks->contains($check)) { $this->checks[] = $check; $check->setEnvelope($this); } return $this; } public function removeCheck(Check $check): self { if ($this->checks->removeElement($check)) { // set the owning side to null (unless already changed) if ($check->getEnvelope() === $this) { $check->setEnvelope(null); } } return $this; } public function getSeason(): ?Season { return $this->season; } public function setSeason(?Season $season): self { $this->season = $season; return $this; }}