src/Entity/Shop/Cart/CartItemAttribute.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Shop\Cart;
  3. use App\Entity\BaseEntity;
  4. use App\Entity\Shop\Shop\Shop;
  5. use App\Repository\Shop\Cart\CartItemAttributeRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
  8. #[ORM\Entity(repositoryClassCartItemAttributeRepository::class)]
  9. class CartItemAttribute extends BaseEntity
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\Column(type'guid'uniquetrue)]
  13.     #[ORM\GeneratedValue(strategy'CUSTOM')]
  14.     #[ORM\CustomIdGenerator(class: UuidGenerator::class)]
  15.     private ?string $id;
  16.     #[ORM\ManyToOne(inversedBy'cartItemAttributes')]
  17.     #[ORM\JoinColumn(nullablefalse)]
  18.     private ?CartItem $cartItem null;
  19.     #[ORM\Column(length255)]
  20.     private ?string $attributeName null;
  21.     #[ORM\Column(length255)]
  22.     private ?string $attributeValue null;
  23.     #[ORM\ManyToOne(inversedBy'cartItemAttributes')]
  24.     #[ORM\JoinColumn(nullablefalse)]
  25.     private ?Shop $shop null;
  26.     public function __construct()
  27.     {
  28.         parent::__construct();
  29.     }
  30.     public function getId(): ?string
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getCartItem(): ?CartItem
  35.     {
  36.         return $this->cartItem;
  37.     }
  38.     public function setCartItem(?CartItem $cartItem): static
  39.     {
  40.         $this->cartItem $cartItem;
  41.         return $this;
  42.     }
  43.     public function getAttributeName(): ?string
  44.     {
  45.         return $this->attributeName;
  46.     }
  47.     public function setAttributeName(string $attributeName): static
  48.     {
  49.         $this->attributeName $attributeName;
  50.         return $this;
  51.     }
  52.     public function getAttributeValue(): ?string
  53.     {
  54.         return $this->attributeValue;
  55.     }
  56.     public function setAttributeValue(string $attributeValue): static
  57.     {
  58.         $this->attributeValue $attributeValue;
  59.         return $this;
  60.     }
  61.     public function getShop(): ?Shop
  62.     {
  63.         return $this->shop;
  64.     }
  65.     public function setShop(?Shop $shop): static
  66.     {
  67.         $this->shop $shop;
  68.         return $this;
  69.     }
  70. }