<?php declare(strict_types=1);
namespace Nds\RecipeManager\Core\Content\Ingredient;
use Shopware\Core\Content\Product\ProductEntity;
use Nds\RecipeManager\Core\Content\Unit\UnitEntity;
use Shopware\Core\Framework\DataAbstractionLayer\Entity;
use Shopware\Core\Framework\DataAbstractionLayer\EntityIdTrait;
use Nds\RecipeManager\Core\Content\Ingredient\Aggregate\IngredientTranslation\IngredientTranslationCollection;
class IngredientEntity extends Entity
{
use EntityIdTrait;
/**
* @var string
*/
protected $recipeId;
/**
* @var string|null
*/
protected $productId;
/**
* @var string|null
*/
protected $unitId;
/**
* @var string|null
*/
protected $name;
/**
* @var float|null
*/
protected $quantity;
/**
* @var int|null
*/
protected $position;
/**
* @var ProductEntity|null
*/
protected $product;
/**
* @var UnitEntity|null
*/
protected $unit;
/**
* @var IngredientTranslationCollection|null
*/
protected $translations;
/**
* @var \DateTimeInterface|null
*/
protected $createdAt;
/**
* @var \DateTimeInterface|null
*/
protected $updatedAt;
public function getRecipeId(): string
{
return $this->recipeId;
}
public function setRecipeId(string $recipeId): void
{
$this->recipeId = $recipeId;
}
public function getProductId(): ?string
{
return $this->productId;
}
public function setProductId(?string $productId): void
{
$this->productId = $productId;
}
public function getUnitId(): ?string
{
return $this->unitId;
}
public function setUnitId(?string $unitId): void
{
$this->unitId = $unitId;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): void
{
$this->name = $name;
}
public function getQuantity(): ?float
{
return $this->quantity;
}
public function setQuantity(?float $quantity): void
{
$this->quantity = $quantity;
}
public function getPosition(): ?int
{
return $this->position;
}
public function setPosition(?int $position): void
{
$this->position = $position;
}
public function getProduct(): ?ProductEntity
{
return $this->product;
}
public function setProduct(?ProductEntity $product): void
{
$this->product = $product;
}
public function getUnit(): ?UnitEntity
{
return $this->unit;
}
public function setUnit(?UnitEntity $unit): void
{
$this->unit = $unit;
}
public function getTranslations(): ?IngredientTranslationCollection
{
return $this->translations;
}
public function setTranslations(IngredientTranslationCollection $translations): void
{
$this->translations = $translations;
}
public function getCreatedAt(): \DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): void
{
$this->createdAt = $createdAt;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeInterface $updatedAt): void
{
$this->updatedAt = $updatedAt;
}
}