<?php
namespace App\Entity;
use App\Entity\SuperClass\BaseEntity;
use App\Repository\CartRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CartRepository::class)
*/
class Cart extends BaseEntity
{
/**
* @ORM\Column(type="json")
*/
private $response = [];
/**
* @ORM\Column(type="string", length=255)
*/
private $customer_id;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="cart")
*/
private $owner;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="carts")
*/
private $created_by;
/**
* @ORM\ManyToOne(targetEntity=Source::class, cascade={"persist", "remove"})
*/
private $source;
/**
* @ORM\ManyToOne(targetEntity=Address::class, cascade={"persist", "remove"})
*/
private $billing;
/**
* @ORM\ManyToOne(targetEntity=Address::class, cascade={"persist", "remove"})
*/
private $shipping;
public function getResponse(): ?array
{
return $this->response;
}
public function setResponse(array $response): self
{
$this->response = $response;
return $this;
}
public function getCustomerId(): ?string
{
return $this->customer_id;
}
public function setCustomerId(string $customer_id): self
{
$this->customer_id = $customer_id;
return $this;
}
public function getCreatedBy(): ?User
{
return $this->created_by;
}
public function setCreatedBy(?User $created_by): self
{
$this->created_by = $created_by;
return $this;
}
public function getOwner(): ?User
{
return $this->owner;
}
public function setOwner(?User $owner): self
{
$this->owner = $owner;
return $this;
}
public function getSource(): ?Source
{
return $this->source;
}
public function setSource(?Source $source): self
{
$this->source = $source;
return $this;
}
public function getBilling(): ?Address
{
return $this->billing;
}
public function setBilling(?Address $billing): self
{
$this->billing = $billing;
return $this;
}
public function getShipping(): ?Address
{
return $this->shipping;
}
public function setShipping(?Address $shipping): self
{
$this->shipping = $shipping;
return $this;
}
}