src/Entity/System/CartProduct.php line 19

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