src/Entity/System/CartProduct.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * Cart
  6.  *
  7.  * @ORM\Table(name="ps_cart_product")
  8.  *
  9.  * @ORM\Entity(repositoryClass="App\Repository\System\CartProductRepository")
  10.  */
  11. class CartProduct
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Id
  17.      *
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      *
  20.      * @ORM\Column(type="integer", name="id_cart_product")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @var Cart
  25.      *
  26.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Cart", inversedBy="cartProducts")
  27.      *
  28.      * @ORM\JoinColumn(name="id_cart", referencedColumnName="id_cart")
  29.      */
  30.     private $cart;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Order")
  33.      *
  34.      * @ORM\JoinColumn(name="order_id", referencedColumnName="id_order", nullable=true)
  35.      */
  36.     private ?Order $order null;
  37.     /**
  38.      * @var int
  39.      *
  40.      * @ORM\Column(type="integer", name="id_product")
  41.      */
  42.     private $productId;
  43.     /**
  44.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Address")
  45.      *
  46.      * @ORM\JoinColumn(referencedColumnName="id_address", name="id_address_delivery", nullable=true)
  47.      */
  48.     private ?Address $addressDelivery;
  49.     /**
  50.      * @var int|null
  51.      *
  52.      * @ORM\Column(type="integer", length=10, nullable=true, name="id_product_attribute")
  53.      */
  54.     private $productAttributeId;
  55.     /**
  56.      * @var int
  57.      *
  58.      * @ORM\Column(type="integer", length=10, options={"default" : 0})
  59.      */
  60.     private $quantity;
  61.     /**
  62.      * @var \DateTime
  63.      *
  64.      * @ORM\Column(type="datetime")
  65.      */
  66.     private $dateAdd;
  67.     /**
  68.      * @var \DateTime
  69.      *
  70.      * @ORM\Column(type="datetime")
  71.      */
  72.     private $dateUpd;
  73.     /**
  74.      * @var int|null
  75.      *
  76.      * @ORM\Column(type="integer", length=10, nullable=true, options={"default" : 0})
  77.      */
  78.     private $locks;
  79.     /**
  80.      * @var bool
  81.      *
  82.      * @ORM\Column(type="boolean", nullable=true, columnDefinition="tinyint(1)", options={"default" : 0})
  83.      */
  84.     private $futureStock;
  85.     /**
  86.      * @var bool
  87.      *
  88.      * @ORM\Column(type="boolean", nullable=true, columnDefinition="tinyint(1)", options={"default" : 0})
  89.      */
  90.     private $externStock;
  91.     /**
  92.      * @var string|null
  93.      *
  94.      * @ORM\Column(type="string", nullable=true, length=50, options={"default" : "0"})
  95.      */
  96.     private $purchaseOrder;
  97.     /**
  98.      * @var int|null
  99.      *
  100.      * @ORM\Column(name="id_purchase_line", type="integer", length=11, nullable=true, options={"default" : 0})
  101.      */
  102.     private $purchaseLineId;
  103.     /**
  104.      * @var int|null
  105.      *
  106.      * @ORM\Column(name="envio_excluido", type="boolean", nullable=true, columnDefinition="tinyint(1)", options={"default" : 0})
  107.      */
  108.     private $shippingExcluded;
  109.     /**
  110.      * @var string|null
  111.      *
  112.      * @ORM\Column(type="string", nullable=true, length=150,)
  113.      */
  114.     private $internalReference;
  115.     /**
  116.      * @var bool
  117.      *
  118.      * @ORM\Column(name="extern_stock_3_5", type="boolean", nullable=true, columnDefinition="tinyint(1)", options={"default" : 0})
  119.      */
  120.     private $externStock3To5;
  121.     /**
  122.      * @ORM\Column(name="shop_360_topic", type="integer", length=2, nullable=true)
  123.      */
  124.     private ?int $shop360Topic null;
  125.     public function __construct()
  126.     {
  127.         $this->futureStock false;
  128.         $this->externStock false;
  129.         $this->externStock3To5 false;
  130.     }
  131.     /**
  132.      * @return int
  133.      */
  134.     public function getId(): int
  135.     {
  136.         return $this->id;
  137.     }
  138.     /**
  139.      * @param int|null $id
  140.      *
  141.      * @return CartProduct
  142.      */
  143.     public function setId(?int $id): CartProduct
  144.     {
  145.         $this->id $id;
  146.         return $this;
  147.     }
  148.     /**
  149.      * @return Cart
  150.      */
  151.     public function getCart(): Cart
  152.     {
  153.         return $this->cart;
  154.     }
  155.     /**
  156.      * @param Cart $cart
  157.      *
  158.      * @return CartProduct
  159.      */
  160.     public function setCart(Cart $cart): CartProduct
  161.     {
  162.         $this->cart $cart;
  163.         return $this;
  164.     }
  165.     public function getOrder(): ?Order
  166.     {
  167.         return $this->order;
  168.     }
  169.     public function setOrder(?Order $order): CartProduct
  170.     {
  171.         $this->order $order;
  172.         return $this;
  173.     }
  174.     /**
  175.      * @return int
  176.      */
  177.     public function getProductId(): int
  178.     {
  179.         return $this->productId;
  180.     }
  181.     /**
  182.      * @param int $productId
  183.      *
  184.      * @return CartProduct
  185.      */
  186.     public function setProductId(int $productId): CartProduct
  187.     {
  188.         $this->productId $productId;
  189.         return $this;
  190.     }
  191.     public function getAddressDelivery(): ?Address
  192.     {
  193.         return $this->addressDelivery;
  194.     }
  195.     public function setAddressDelivery(?Address $addressDelivery): CartProduct
  196.     {
  197.         $this->addressDelivery $addressDelivery;
  198.         return $this;
  199.     }
  200.     /**
  201.      * @return int|null
  202.      */
  203.     public function getProductAttributeId(): ?int
  204.     {
  205.         return $this->productAttributeId;
  206.     }
  207.     /**
  208.      * @param int|null $productAttributeId
  209.      *
  210.      * @return CartProduct
  211.      */
  212.     public function setProductAttributeId(?int $productAttributeId): CartProduct
  213.     {
  214.         $this->productAttributeId $productAttributeId;
  215.         return $this;
  216.     }
  217.     /**
  218.      * @return int|null
  219.      */
  220.     public function getQuantity(): ?int
  221.     {
  222.         return $this->quantity;
  223.     }
  224.     /**
  225.      * @param int $quantity
  226.      *
  227.      * @return CartProduct
  228.      */
  229.     public function setQuantity(int $quantity): CartProduct
  230.     {
  231.         $this->quantity $quantity;
  232.         return $this;
  233.     }
  234.     /**
  235.      * @return \DateTime|null
  236.      */
  237.     public function getDateAdd(): ?\DateTime
  238.     {
  239.         return $this->dateAdd;
  240.     }
  241.     /**
  242.      * @param \DateTime $dateAdd
  243.      *
  244.      * @return CartProduct
  245.      */
  246.     public function setDateAdd(\DateTime $dateAdd): CartProduct
  247.     {
  248.         $this->dateAdd $dateAdd;
  249.         return $this;
  250.     }
  251.     /**
  252.      * @return \DateTime
  253.      */
  254.     public function getDateUpd(): \DateTime
  255.     {
  256.         return $this->dateUpd;
  257.     }
  258.     /**
  259.      * @param \DateTime $dateUpd
  260.      *
  261.      * @return CartProduct
  262.      */
  263.     public function setDateUpd(\DateTime $dateUpd): CartProduct
  264.     {
  265.         $this->dateUpd $dateUpd;
  266.         return $this;
  267.     }
  268.     /**
  269.      * @return int|null
  270.      */
  271.     public function getLocks(): ?int
  272.     {
  273.         return $this->locks;
  274.     }
  275.     /**
  276.      * @param int|null $locks
  277.      *
  278.      * @return CartProduct
  279.      */
  280.     public function setLocks(?int $locks): CartProduct
  281.     {
  282.         $this->locks $locks;
  283.         return $this;
  284.     }
  285.     public function getFutureStock(): bool
  286.     {
  287.         return $this->futureStock;
  288.     }
  289.     public function setFutureStock(bool $futureStock): CartProduct
  290.     {
  291.         $this->futureStock $futureStock;
  292.         return $this;
  293.     }
  294.     public function getExternStock(): ?bool
  295.     {
  296.         return $this->externStock;
  297.     }
  298.     public function setExternStock(bool $externStock): CartProduct
  299.     {
  300.         $this->externStock $externStock;
  301.         return $this;
  302.     }
  303.     /**
  304.      * @return string|null
  305.      */
  306.     public function getPurchaseOrder(): ?string
  307.     {
  308.         return $this->purchaseOrder;
  309.     }
  310.     /**
  311.      * @param string|null $purchaseOrder
  312.      *
  313.      * @return CartProduct
  314.      */
  315.     public function setPurchaseOrder(?string $purchaseOrder): CartProduct
  316.     {
  317.         $this->purchaseOrder $purchaseOrder;
  318.         return $this;
  319.     }
  320.     /**
  321.      * @return int|null
  322.      */
  323.     public function getPurchaseLineId(): ?int
  324.     {
  325.         return $this->purchaseLineId;
  326.     }
  327.     /**
  328.      * @param int|null $purchaseLineId
  329.      *
  330.      * @return CartProduct
  331.      */
  332.     public function setPurchaseLineId(?int $purchaseLineId): CartProduct
  333.     {
  334.         $this->purchaseLineId $purchaseLineId;
  335.         return $this;
  336.     }
  337.     /**
  338.      * @return int|null
  339.      */
  340.     public function getShippingExcluded(): ?int
  341.     {
  342.         return $this->shippingExcluded;
  343.     }
  344.     /**
  345.      * @param int|null $shippingExcluded
  346.      *
  347.      * @return CartProduct
  348.      */
  349.     public function setShippingExcluded(?int $shippingExcluded): CartProduct
  350.     {
  351.         $this->shippingExcluded $shippingExcluded;
  352.         return $this;
  353.     }
  354.     /**
  355.      * @return string|null
  356.      */
  357.     public function getInternalReference(): ?string
  358.     {
  359.         return $this->internalReference;
  360.     }
  361.     /**
  362.      * @param string|null $internalReference
  363.      *
  364.      * @return CartProduct
  365.      */
  366.     public function setInternalReference(?string $internalReference): CartProduct
  367.     {
  368.         $this->internalReference $internalReference;
  369.         return $this;
  370.     }
  371.     public function isExternStock3To5(): bool
  372.     {
  373.         return $this->externStock3To5;
  374.     }
  375.     public function setExternStock3To5(bool $externStock3To5): CartProduct
  376.     {
  377.         $this->externStock3To5 $externStock3To5;
  378.         return $this;
  379.     }
  380.     /**
  381.      * @return int|null
  382.      */
  383.     public function getShop360Topic(): ?int
  384.     {
  385.         return $this->shop360Topic;
  386.     }
  387.     /**
  388.      * @param int|null $shop360Topic
  389.      *
  390.      * @return CartProduct
  391.      */
  392.     public function setShop360Topic(?int $shop360Topic): CartProduct
  393.     {
  394.         $this->shop360Topic $shop360Topic;
  395.         return $this;
  396.     }
  397. }