<?php
namespace App\Entity;
use App\Repository\ShopCartRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ShopCartRepository::class)]
class ShopCart
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'shopCartItems')]
#[ORM\JoinColumn(nullable: false)]
private ?User $user = null;
#[ORM\ManyToOne]
#[ORM\JoinColumn(nullable: false)]
private ?Product $product = null;
#[ORM\Column]
private ?int $count = null;
#[ORM\ManyToOne(inversedBy: 'shopCartItem')]
#[ORM\JoinColumn(nullable: false)]
private ?ProductsSizes $size = null;
public function getId(): ?int
{
return $this->id;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getProduct(): ?Product
{
return $this->product;
}
public function setProduct(?Product $product): self
{
$this->product = $product;
return $this;
}
public function getCount(): ?int
{
return $this->count;
}
public function setCount(int $count): self
{
$this->count = $count;
return $this;
}
public function getSize(): ?ProductsSizes
{
return $this->size;
}
public function setSize(?ProductsSizes $size): self
{
$this->size = $size;
return $this;
}
}