src/Entity/Whatsapp/WhatsappOrderProduct.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Whatsapp;
  3. use App\Repository\Whatsapp\WhatsappOrderProductRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Table(name="vulco_whatsapp_order_product")
  7.  * @ORM\Entity(repositoryClass=WhatsappOrderProductRepository::class)
  8.  *
  9.  * @see \App\Model\Whatsapp\Webhook\ProductItem
  10.  */
  11. class WhatsappOrderProduct
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     protected int $id;
  19.     /**
  20.      * @ORM\ManyToOne(targetEntity="WhatsappOrder", inversedBy="products")
  21.      */
  22.     private WhatsappOrder $whatsappOrder;
  23.     /**
  24.      * @ORM\Column(type="string", length=255, nullable=false)
  25.      */
  26.     private string $productRetailerId;
  27.     /**
  28.      * @ORM\Column(type="integer", nullable=false)
  29.      */
  30.     private string $quantity;
  31.     /**
  32.      * @ORM\Column(type="string", length=127, nullable=false)
  33.      */
  34.     private string $itemPrice;
  35.     /**
  36.      * @ORM\Column(type="string", length=31, nullable=false)
  37.      */
  38.     private string $currency;
  39.     public function __construct(
  40.         string $ProductRetailerId,
  41.         string $quantity,
  42.         string $itemPrice,
  43.         string $currency,
  44.     )
  45.     {
  46.         $this->productRetailerId $ProductRetailerId;
  47.         $this->quantity $quantity;
  48.         $this->itemPrice $itemPrice;
  49.         $this->currency $currency;
  50.     }
  51.     public function getId(): int
  52.     {
  53.         return $this->id;
  54.     }
  55.     public function getWhatsappOrder(): WhatsappOrder
  56.     {
  57.         return $this->whatsappOrder;
  58.     }
  59.     public function setWhatsappOrder(WhatsappOrder $whatsappOrder): self
  60.     {
  61.         $this->whatsappOrder $whatsappOrder;
  62.         return $this;
  63.     }
  64.     public function getProductRetailerId(): ?string
  65.     {
  66.         return $this->productRetailerId;
  67.     }
  68.     public function setProductRetailerId(?string $productRetailerId): self
  69.     {
  70.         $this->productRetailerId $productRetailerId;
  71.         return $this;
  72.     }
  73.     public function getQuantity(): string
  74.     {
  75.         return $this->quantity;
  76.     }
  77.     public function setQuantity(string $quantity): self
  78.     {
  79.         $this->quantity $quantity;
  80.         return $this;
  81.     }
  82.     public function getItemPrice(): string
  83.     {
  84.         return $this->itemPrice;
  85.     }
  86.     public function setItemPrice(string $itemPrice): self
  87.     {
  88.         $this->itemPrice $itemPrice;
  89.         return $this;
  90.     }
  91.     public function getCurrency(): string
  92.     {
  93.         return $this->currency;
  94.     }
  95.     public function setCurrency(string $currency): self
  96.     {
  97.         $this->currency $currency;
  98.         return $this;
  99.     }
  100. }