<?phpnamespace App\Entity;use App\Repository\StockTakeRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: StockTakeRepository::class)]class StockTake extends BaseEntity{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[ORM\Column(type: 'string', length: 255, nullable: true)] private $description; #[ORM\Column(type: 'datetime', length: 255, nullable: true)] private $date; #[ORM\Column(type: 'boolean')] private $isFinished; #[ORM\OneToMany(mappedBy: 'stockTake', targetEntity: StockTakeProducts::class)] private $stockTakeProducts; #[ORM\ManyToOne(targetEntity: Warehouse::class)] private $warehouse; public function __construct() { $this->stockTakeProducts = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getDescription(): ?string { return $this->description; } public function setDescription(?string $description): self { $this->description = $description; return $this; } public function getDate() { return $this->date; } public function setDate($date) { $this->date = $date; return $this; } public function isIsFinished(): ?bool { return $this->isFinished; } public function setIsFinished(bool $isFinished): self { $this->isFinished = $isFinished; return $this; } /** * @return Collection<int, StockTakeProducts> */ public function getStockTakeProducts(): Collection { return $this->stockTakeProducts; } public function addStockTakeProduct(StockTakeProducts $stockTakeProduct): self { if (!$this->stockTakeProducts->contains($stockTakeProduct)) { $this->stockTakeProducts[] = $stockTakeProduct; $stockTakeProduct->setStockTake($this); } return $this; } public function removeStockTakeProduct(StockTakeProducts $stockTakeProduct): self { if ($this->stockTakeProducts->removeElement($stockTakeProduct)) { // set the owning side to null (unless already changed) if ($stockTakeProduct->getStockTake() === $this) { $stockTakeProduct->setStockTake(null); } } return $this; } public function getWarehouse(): ?Warehouse { return $this->warehouse; } public function setWarehouse(?Warehouse $warehouse): self { $this->warehouse = $warehouse; return $this; }}