src/Entity/CartItem.php line 7

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Table(name'cart_item')]
  5. #[ORM\Entity(repositoryClass'App\Entity\Repository\CartItemRepository')]
  6. class CartItem
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\Column(type'integer')]
  10.     #[ORM\GeneratedValue(strategy'AUTO')]
  11.     private $id;
  12.     #[ORM\Column(type'string'nullabletrue)]
  13.     private $articlenumber;
  14.     #[ORM\Column(type'integer'nullabletrue)]
  15.     private $amount;
  16.     #[ORM\Column(type'float'nullabletrueprecision6scale2)]
  17.     private $price;
  18.     #[ORM\Column(type'datetime'nullablefalse)]
  19.     private $date_created;
  20.     #[ORM\ManyToOne(targetEntity'App\Entity\Shoparticle'inversedBy'cartItem')]
  21.     #[ORM\JoinColumn(name'shoparticle_id'referencedColumnName'id')]
  22.     private $shoparticle;
  23.     #[ORM\ManyToOne(targetEntity'App\Entity\User'inversedBy'cartItem')]
  24.     #[ORM\JoinColumn(name'user_id'referencedColumnName'id'nullablefalse)]
  25.     private $user;
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getArticlenumber(): ?string
  31.     {
  32.         return $this->articlenumber;
  33.     }
  34.     public function setArticlenumber(?string $articlenumber): self
  35.     {
  36.         $this->articlenumber $articlenumber;
  37.         return $this;
  38.     }
  39.     public function getAmount(): ?int
  40.     {
  41.         return $this->amount;
  42.     }
  43.     public function setAmount(?int $amount): self
  44.     {
  45.         $this->amount $amount;
  46.         return $this;
  47.     }
  48.     public function getPrice(): ?float
  49.     {
  50.         return $this->price;
  51.     }
  52.     public function setPrice(?float $price): self
  53.     {
  54.         $this->price $price;
  55.         return $this;
  56.     }
  57.     public function getDateCreated(): ?\DateTimeInterface
  58.     {
  59.         return $this->date_created;
  60.     }
  61.     public function setDateCreated(\DateTimeInterface $date_created): self
  62.     {
  63.         $this->date_created $date_created;
  64.         return $this;
  65.     }
  66.     public function getShoparticle(): ?Shoparticle
  67.     {
  68.         return $this->shoparticle;
  69.     }
  70.     public function setShoparticle(?Shoparticle $shoparticle): self
  71.     {
  72.         $this->shoparticle $shoparticle;
  73.         return $this;
  74.     }
  75.     public function getUser(): ?User
  76.     {
  77.         return $this->user;
  78.     }
  79.     public function setUser(?User $user): self
  80.     {
  81.         $this->user $user;
  82.         return $this;
  83.     }
  84. }