<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
use App\Entity\ProductModel;
/**
* ProductsAttributes
*
* @ORM\Table(name="products_models_attributes")
* @ORM\Entity
* @ORM\HasLifecycleCallbacks()
*/
class ProductModelAttribute
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var ProductModel
*
* @ORM\ManyToOne(targetEntity="App\Entity\ProductModel", inversedBy="attributes", cascade={"persist"})
* @ORM\JoinColumn(name="products_models_id", referencedColumnName="id", onDelete="CASCADE")
*/
private $productModel;
/**
* @var Attribute
*
* @ORM\ManyToOne(targetEntity="App\Entity\Attribute")
* @ORM\JoinColumn(name="attributes_id", referencedColumnName="attributes_id", onDelete="CASCADE")
*/
private $attribute;
/**
* @var ?string
*
* @ORM\Column(name="attributes_value", type="string", length=255, nullable=true)
*/
private $value;
public function getId(): int {
return $this->id;
}
public function getProductModel(): ProductModel {
return $this->productModel;
}
public function getAttribute(): Attribute {
return $this->attribute;
}
public function getValue(): ?string {
return $this->value;
}
public function setId(int $id): void {
$this->id = $id;
}
public function setAttribute(Attribute $attribute): void {
$this->attribute = $attribute;
}
public function setValue(?string $value): void {
$this->value = $value;
}
public function setProductModel(ProductModel $productModel): void {
$this->productModel = $productModel;
}
}