<?php
namespace App\Entity;
use App\Repository\CommandProductRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CommandProductRepository::class)
*/
class CommandProduct
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\ManyToOne(targetEntity=Product::class, inversedBy="commandProducts",fetch="EAGER")
* @ORM\JoinColumn(nullable=false)
*/
private $product;
/**
* @ORM\ManyToOne(targetEntity=Command::class, inversedBy="commandProducts",fetch="EAGER")
* @ORM\JoinColumn(nullable=false)
*/
private $command;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $trackingCode;
/**
* @ORM\Column(type="string", length=3, nullable=true)
*/
private $size;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $quantity;
/**
* @ORM\Column(type="boolean")
*/
private $isReceived;
/**
* @ORM\Column(type="array", nullable=true)
*/
private $livraisonMode = [];
/**
* @ORM\Column(type="float", nullable=true)
*/
private $LivraisonPrice;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $color;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isValided;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $payInId;
/**
* @ORM\Column(type="array", nullable=true)
*/
private $options = [];
/**
* @ORM\Column(type="array", nullable=true)
*/
private $optionfarepart = [];
/**
* @ORM\Column(type="float", nullable=true)
*/
private $promo;
public function __construct()
{
$this->createdAt = new \DateTime();
$this->isReceived = false;
$this->isValided = false;
}
public function getId(): ?int
{
return $this->id;
}
public function getProduct(): ?Product
{
return $this->product;
}
public function setProduct(?Product $product): self
{
$this->product = $product;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getCommand(): ?Command
{
return $this->command;
}
public function setCommand(?Command $command): self
{
$this->command = $command;
return $this;
}
public function getTrackingCode(): ?string
{
return $this->trackingCode;
}
public function setTrackingCode(?string $trackingCode): self
{
$this->trackingCode = $trackingCode;
return $this;
}
public function getSize(): ?string
{
return $this->size;
}
public function setSize(?string $size): self
{
$this->size = $size;
return $this;
}
public function getQuantity(): ?int
{
return $this->quantity;
}
public function setQuantity(?int $quantity): self
{
$this->quantity = $quantity;
return $this;
}
public function getIsReceived(): ?bool
{
return $this->isReceived;
}
public function setIsReceived(bool $isReceived): self
{
$this->isReceived = $isReceived;
return $this;
}
public function getLivraisonMode(): ?array
{
return $this->livraisonMode;
}
public function setLivraisonMode(?array $livraisonMode): self
{
$this->livraisonMode = $livraisonMode;
return $this;
}
public function getLivraisonPrice(): ?float
{
return $this->LivraisonPrice;
}
public function setLivraisonPrice(?float $LivraisonPrice): self
{
$this->LivraisonPrice = $LivraisonPrice;
return $this;
}
public function getColor(): ?string
{
return $this->color;
}
public function setColor(?string $color): self
{
$this->color = $color;
return $this;
}
public function getIsValided(): ?bool
{
return $this->isValided;
}
public function setIsValided(?bool $isValided): self
{
$this->isValided = $isValided;
return $this;
}
public function getPayInId(): ?string
{
return $this->payInId;
}
public function setPayInId(?string $payInId): self
{
$this->payInId = $payInId;
return $this;
}
public function getOptions(): ?array
{
return $this->options;
}
public function setOptions(?array $options): self
{
$this->options = $options;
return $this;
}
public function getOptionfarepart(): ?array
{
return $this->optionfarepart;
}
public function setOptionfarepart(?array $optionfarepart): self
{
$this->optionfarepart = $optionfarepart;
return $this;
}
public function getPromo(): ?float
{
return $this->promo;
}
public function setPromo(?float $promo): self
{
$this->promo = $promo;
return $this;
}
}