<?php
namespace App\Entity\Website\Cart;
use App\Entity\BaseEntity;
use App\Entity\Website\Website\Website;
use App\Repository\Website\Cart\CartItemAttributeRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
#[ORM\Entity(repositoryClass: CartItemAttributeRepository::class)]
class CartItemAttribute extends BaseEntity
{
#[ORM\Id]
#[ORM\Column(type: 'guid', unique: true)]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: UuidGenerator::class)]
private ?string $id;
#[ORM\ManyToOne(inversedBy: 'cartItemAttributes')]
#[ORM\JoinColumn(nullable: false)]
private ?CartItem $cartItem = null;
#[ORM\Column(length: 255)]
private ?string $attributeName = null;
#[ORM\Column(length: 255)]
private ?string $attributeValue = null;
#[ORM\ManyToOne(inversedBy: 'cartItemAttributes')]
#[ORM\JoinColumn(nullable: false)]
private ?Website $website = null;
public function __construct()
{
parent::__construct();
}
public function getId(): ?string
{
return $this->id;
}
public function getCartItem(): ?CartItem
{
return $this->cartItem;
}
public function setCartItem(?CartItem $cartItem): static
{
$this->cartItem = $cartItem;
return $this;
}
public function getAttributeName(): ?string
{
return $this->attributeName;
}
public function setAttributeName(string $attributeName): static
{
$this->attributeName = $attributeName;
return $this;
}
public function getAttributeValue(): ?string
{
return $this->attributeValue;
}
public function setAttributeValue(string $attributeValue): static
{
$this->attributeValue = $attributeValue;
return $this;
}
public function getWebsite(): ?Website
{
return $this->website;
}
public function setWebsite(?Website $shop): static
{
$this->website = $shop;
return $this;
}
}