<?php
namespace App\Entity\Shop\Cart;
use App\Entity\BaseEntity;
use App\Entity\Shop\Shop\Shop;
use App\Repository\Shop\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 ?Shop $shop = 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 getShop(): ?Shop
{
return $this->shop;
}
public function setShop(?Shop $shop): static
{
$this->shop = $shop;
return $this;
}
}