<?phpnamespace App\Entity;use App\Repository\ProductRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=ProductRepository::class) */class Product{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=80) */ private $tag_id; /** * @ORM\ManyToOne(targetEntity=ProductType::class, inversedBy="products") * @ORM\JoinColumn(nullable=false) */ private $product_type; /** * @ORM\Column(type="date") */ private $date_entered; /** * @ORM\Column(type="date", nullable=True) */ private $date_sold; /** * @ORM\Column(type="string", length=3) */ private $status; /** * @ORM\ManyToOne(targetEntity=Fridge::class, inversedBy="products") ApiCallLog*/ private $fridge; /** * @ORM\ManyToOne(targetEntity=ApiCallLog::class, inversedBy="products") */ private $api_call_log; /** * @ORM\Column(type="date", nullable=true) */ private $date_expiry; public function __construct() { } public function __toString() { return $this->name; } public function getId(): ?int { return $this->id; } public function getTagId(): ?string { return $this->tag_id; } public function setTagId(string $tag_id): self { $this->tag_id = $tag_id; return $this; } public function getProductType(): ?ProductType { return $this->product_type; } public function setProductType(?ProductType $product_type): self { $this->product_type = $product_type; return $this; } public function getDateEntered(): ?\DateTimeInterface { return $this->date_entered; } public function setDateEntered(\DateTimeInterface $date_entered): self { $this->date_entered = $date_entered; return $this; } public function getDateSold(): ?\DateTimeInterface { return $this->date_sold; } public function setDateSold(\DateTimeInterface $date_sold): self { $this->date_sold = $date_sold; return $this; } public function getStatus(): ?string { return $this->status; } public function setStatus(string $status): self { $this->status = $status; return $this; } public function getFridge(): ?Fridge { return $this->fridge; } public function setFridge(?Fridge $fridge): self { $this->fridge = $fridge; return $this; } public function getApiCallLog(): ?ApiCallLog { return $this->api_call_log; } public function setApiCallLog(?ApiCallLog $api_call_log): self { $this->api_call_log = $api_call_log; return $this; } public function getDateExpiry(): ?\DateTimeInterface { return $this->date_expiry; } public function setDateExpiry(?\DateTimeInterface $date_expiry): self { $this->date_expiry = $date_expiry; return $this; }}