src/Entity/CommandProduct.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CommandProductRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=CommandProductRepository::class)
  7.  */
  8. class CommandProduct
  9. {
  10.     /**
  11.      * @ORM\Id()
  12.      * @ORM\GeneratedValue()
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="datetime")
  18.      */
  19.     private $createdAt;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=Product::class, inversedBy="commandProducts",fetch="EAGER")
  22.      * @ORM\JoinColumn(nullable=false)
  23.      */
  24.     private $product;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=Command::class, inversedBy="commandProducts",fetch="EAGER")
  27.      * @ORM\JoinColumn(nullable=false)
  28.      */
  29.     private $command;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $trackingCode;
  34.     /**
  35.      * @ORM\Column(type="string", length=3, nullable=true)
  36.      */
  37.     private $size;
  38.     /**
  39.      * @ORM\Column(type="integer", nullable=true)
  40.      */
  41.     private $quantity;
  42.     /**
  43.      * @ORM\Column(type="boolean")
  44.      */
  45.     private $isReceived;
  46.     /**
  47.      * @ORM\Column(type="array", nullable=true)
  48.      */
  49.     private $livraisonMode = [];
  50.     /**
  51.      * @ORM\Column(type="float", nullable=true)
  52.      */
  53.     private $LivraisonPrice;
  54.     /**
  55.      * @ORM\Column(type="string", length=255, nullable=true)
  56.      */
  57.     private $color;
  58.     /**
  59.      * @ORM\Column(type="boolean", nullable=true)
  60.      */
  61.     private $isValided;
  62.     /**
  63.      * @ORM\Column(type="string", length=255, nullable=true)
  64.      */
  65.     private $payInId;
  66.     /**
  67.      * @ORM\Column(type="array", nullable=true)
  68.      */
  69.     private $options = [];
  70.     /**
  71.      * @ORM\Column(type="array", nullable=true)
  72.      */
  73.     private $optionfarepart = [];
  74.     /**
  75.      * @ORM\Column(type="float", nullable=true)
  76.      */
  77.     private $promo;
  78.     public function __construct()
  79.     {
  80.         $this->createdAt = new \DateTime();
  81.         $this->isReceived false;
  82.         $this->isValided false;
  83.     }
  84.     public function getId(): ?int
  85.     {
  86.         return $this->id;
  87.     }
  88.     public function getProduct(): ?Product
  89.     {
  90.         return $this->product;
  91.     }
  92.     public function setProduct(?Product $product): self
  93.     {
  94.         $this->product $product;
  95.         return $this;
  96.     }
  97.     public function getCreatedAt(): ?\DateTimeInterface
  98.     {
  99.         return $this->createdAt;
  100.     }
  101.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  102.     {
  103.         $this->createdAt $createdAt;
  104.         return $this;
  105.     }
  106.     public function getCommand(): ?Command
  107.     {
  108.         return $this->command;
  109.     }
  110.     public function setCommand(?Command $command): self
  111.     {
  112.         $this->command $command;
  113.         return $this;
  114.     }
  115.     public function getTrackingCode(): ?string
  116.     {
  117.         return $this->trackingCode;
  118.     }
  119.     public function setTrackingCode(?string $trackingCode): self
  120.     {
  121.         $this->trackingCode $trackingCode;
  122.         return $this;
  123.     }
  124.     public function getSize(): ?string
  125.     {
  126.         return $this->size;
  127.     }
  128.     public function setSize(?string $size): self
  129.     {
  130.         $this->size $size;
  131.         return $this;
  132.     }
  133.     public function getQuantity(): ?int
  134.     {
  135.         return $this->quantity;
  136.     }
  137.     public function setQuantity(?int $quantity): self
  138.     {
  139.         $this->quantity $quantity;
  140.         return $this;
  141.     }
  142.     public function getIsReceived(): ?bool
  143.     {
  144.         return $this->isReceived;
  145.     }
  146.     public function setIsReceived(bool $isReceived): self
  147.     {
  148.         $this->isReceived $isReceived;
  149.         return $this;
  150.     }
  151.     public function getLivraisonMode(): ?array
  152.     {
  153.         return $this->livraisonMode;
  154.     }
  155.     public function setLivraisonMode(?array $livraisonMode): self
  156.     {
  157.         $this->livraisonMode $livraisonMode;
  158.         return $this;
  159.     }
  160.     public function getLivraisonPrice(): ?float
  161.     {
  162.         return $this->LivraisonPrice;
  163.     }
  164.     public function setLivraisonPrice(?float $LivraisonPrice): self
  165.     {
  166.         $this->LivraisonPrice $LivraisonPrice;
  167.         return $this;
  168.     }
  169.     public function getColor(): ?string
  170.     {
  171.         return $this->color;
  172.     }
  173.     public function setColor(?string $color): self
  174.     {
  175.         $this->color $color;
  176.         return $this;
  177.     }
  178.     public function getIsValided(): ?bool
  179.     {
  180.         return $this->isValided;
  181.     }
  182.     public function setIsValided(?bool $isValided): self
  183.     {
  184.         $this->isValided $isValided;
  185.         return $this;
  186.     }
  187.     public function getPayInId(): ?string
  188.     {
  189.         return $this->payInId;
  190.     }
  191.     public function setPayInId(?string $payInId): self
  192.     {
  193.         $this->payInId $payInId;
  194.         return $this;
  195.     }
  196.     public function getOptions(): ?array
  197.     {
  198.         return $this->options;
  199.     }
  200.     public function setOptions(?array $options): self
  201.     {
  202.         $this->options $options;
  203.         return $this;
  204.     }
  205.     public function getOptionfarepart(): ?array
  206.     {
  207.         return $this->optionfarepart;
  208.     }
  209.     public function setOptionfarepart(?array $optionfarepart): self
  210.     {
  211.         $this->optionfarepart $optionfarepart;
  212.         return $this;
  213.     }
  214.     public function getPromo(): ?float
  215.     {
  216.         return $this->promo;
  217.     }
  218.     public function setPromo(?float $promo): self
  219.     {
  220.         $this->promo $promo;
  221.         return $this;
  222.     }
  223. }