import hiltes

This commit is contained in:
mmoeller
2023-02-06 10:11:39 +01:00
parent 991dd95e9d
commit 0c04e6da7c
24 changed files with 100882 additions and 563 deletions

83
src/Entity/Product.php Normal file
View File

@@ -0,0 +1,83 @@
<?php
namespace App\Entity;
use ApiPlatform\Metadata\ApiResource;
use App\Repository\ProductRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ProductRepository::class)]
#[ApiResource]
class Product
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $gtin = null;
#[ORM\Column(length: 255)]
private ?string $shopwareId = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $updateTime = null;
#[ORM\OneToOne(inversedBy: 'product', cascade: ['persist', 'remove'])]
private ?Stock $stock = null;
public function getId(): ?int
{
return $this->id;
}
public function getGtin(): ?string
{
return $this->gtin;
}
public function setGtin(string $gtin): self
{
$this->gtin = $gtin;
return $this;
}
public function getShopwareId(): ?string
{
return $this->shopwareId;
}
public function setShopwareId(string $shopwareId): self
{
$this->shopwareId = $shopwareId;
return $this;
}
public function getUpdateTime(): ?\DateTimeInterface
{
return $this->updateTime;
}
public function setUpdateTime(\DateTimeInterface $updateTime): self
{
$this->updateTime = $updateTime;
return $this;
}
public function getStock(): ?Stock
{
return $this->stock;
}
public function setStock(?Stock $stock): self
{
$this->stock = $stock;
return $this;
}
}