|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
-
- namespace Lc\ShopBundle\Model;
-
- use Doctrine\ORM\Mapping as ORM;
-
- /**
- * @ORM\MappedSuperclass()
- */
- abstract class Cart extends AbstractEntity
- {
- /**
- * @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\VisitorInterface", inversedBy="cart", cascade={"persist", "remove"})
- * @ORM\JoinColumn(nullable=false)
- */
- protected $visitor;
-
- /**
- * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface", inversedBy="carts")
- */
- protected $user;
-
- /**
- * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\AddressInterface")
- */
- protected $address;
-
-
- public function getVisitor(): ?Visitor
- {
- return $this->visitor;
- }
-
- public function setVisitor(Visitor $visitor): self
- {
- $this->visitor = $visitor;
-
- return $this;
- }
-
- public function getUser(): ?User
- {
- return $this->user;
- }
-
- public function setUser(?User $user): self
- {
- $this->user = $user;
-
- return $this;
- }
-
- public function getAddress(): ?Address
- {
- return $this->address;
- }
-
- public function setAddress(?Address $address): self
- {
- $this->address = $address;
-
- return $this;
- }
- }
|