src/Entity/Cart.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\SuperClass\BaseEntity;
  4. use App\Repository\CartRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7. * @ORM\Entity(repositoryClass=CartRepository::class)
  8. */
  9. class Cart extends BaseEntity
  10. {
  11. /**
  12. * @ORM\Column(type="json")
  13. */
  14. private $response = [];
  15. /**
  16. * @ORM\Column(type="string", length=255)
  17. */
  18. private $customer_id;
  19. /**
  20. * @ORM\ManyToOne(targetEntity=User::class, inversedBy="cart")
  21. */
  22. private $owner;
  23. /**
  24. * @ORM\ManyToOne(targetEntity=User::class, inversedBy="carts")
  25. */
  26. private $created_by;
  27. /**
  28. * @ORM\ManyToOne(targetEntity=Source::class, cascade={"persist", "remove"})
  29. */
  30. private $source;
  31. /**
  32. * @ORM\ManyToOne(targetEntity=Address::class, cascade={"persist", "remove"})
  33. */
  34. private $billing;
  35. /**
  36. * @ORM\ManyToOne(targetEntity=Address::class, cascade={"persist", "remove"})
  37. */
  38. private $shipping;
  39. public function getResponse(): ?array
  40. {
  41. return $this->response;
  42. }
  43. public function setResponse(array $response): self
  44. {
  45. $this->response = $response;
  46. return $this;
  47. }
  48. public function getCustomerId(): ?string
  49. {
  50. return $this->customer_id;
  51. }
  52. public function setCustomerId(string $customer_id): self
  53. {
  54. $this->customer_id = $customer_id;
  55. return $this;
  56. }
  57. public function getCreatedBy(): ?User
  58. {
  59. return $this->created_by;
  60. }
  61. public function setCreatedBy(?User $created_by): self
  62. {
  63. $this->created_by = $created_by;
  64. return $this;
  65. }
  66. public function getOwner(): ?User
  67. {
  68. return $this->owner;
  69. }
  70. public function setOwner(?User $owner): self
  71. {
  72. $this->owner = $owner;
  73. return $this;
  74. }
  75. public function getSource(): ?Source
  76. {
  77. return $this->source;
  78. }
  79. public function setSource(?Source $source): self
  80. {
  81. $this->source = $source;
  82. return $this;
  83. }
  84. public function getBilling(): ?Address
  85. {
  86. return $this->billing;
  87. }
  88. public function setBilling(?Address $billing): self
  89. {
  90. $this->billing = $billing;
  91. return $this;
  92. }
  93. public function getShipping(): ?Address
  94. {
  95. return $this->shipping;
  96. }
  97. public function setShipping(?Address $shipping): self
  98. {
  99. $this->shipping = $shipping;
  100. return $this;
  101. }
  102. }