/
home
/
ubuntu
/
html
/
mixchief_app
/
src
/
Entity
/
Upload File
HOME
<?php namespace App\Entity; use Doctrine\ORM\Mapping as ORM; /** * Orders * * @ORM\Table(name="orders") * @ORM\Entity(repositoryClass="App\Repository\OrdersRepository") */ class Orders { /** * @var int * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var App\Entity\Customer * * @ORM\ManyToOne(targetEntity="App\Entity\Customer", inversedBy="orders") */ private $customer; /** * @var int * * @ORM\Column(name="phone", type="string", length=255, nullable=true) */ private $phone; /** * @var \DateTime * * @ORM\Column(name="date", type="datetime") */ private $date; /** * @var \DateTime * * @ORM\Column(name="modified", type="datetime", nullable=true) */ private $modified; /** * @var float * * @ORM\Column(name="amount", type="float") */ private $amount; /** * @var float * * @ORM\Column(name="discount", type="float", nullable=true) */ private $discount; /** * @var string * * @ORM\Column(name="status", type="string", length=255, nullable=true) */ private $status; /** * @var string * * @ORM\Column(name="payment", type="string", length=255, nullable=true) */ private $payment; /** * @var string * * @ORM\Column(name="comment", type="string", length=255, nullable=true) */ private $comment; /** * @var int * * @ORM\Column(name="user_id", type="integer", nullable=true) */ private $userId; /** * @ORM\OneToOne(targetEntity=OrderDelivery::class, mappedBy="orders", cascade={"persist", "remove"}) */ private $delivery; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $payment_reference; /** * @ORM\Column(type="boolean", nullable=true) */ private $confirmed; /** * Set userId * * @param int $userId * * @return Groups */ public function setUserId($userId) { $this->userId = $userId; return $this; } /** * Get userId * * @return int */ public function getUserId() { return $this->userId; } public function __construct() { $this->date = new \DateTime(); } /** * Get id * * @return int */ public function getId() { return $this->id; } /** * Set customer * * @param Customer $customer * * @return Orders */ public function setCustomer($customer) { $this->customer = $customer; return $this; } /** * Get customer * * @return Customer */ public function getCustomer() { return $this->customer; } /** * Set phone * * @param Phone $phone * * @return Orders */ public function setPhone($phone) { $this->phone = $phone; return $this; } /** * Get phone * * @return Phone */ public function getPhone() { return $this->phone; } /** * Set date * * @param \DateTime $date * * @return Orders */ public function setDate($date) { $this->date = $date; return $this; } /** * Get date * * @return \DateTime */ public function getDate() { return $this->date; } /** * Set date * * @param \DateTime $date * * @return Orders */ public function setModified($date) { $this->modified = $date; return $this; } /** * Get date * * @return \DateTime */ public function getModified() { return $this->modified; } /** * Set amount * * @param float $amount * * @return Orders */ public function setAmount($amount) { $this->amount = $amount; return $this; } /** * Get amount * * @return float */ public function getAmount() { return $this->amount; } /** * Set status * * @param string $status * * @return Orders */ public function setStatus($status) { $this->status = $status; return $this; } /** * Get status * * @return string */ public function getStatus() { return $this->status; } /** * Set payment * * @param string $payment * * @return Orders */ public function setPayment($payment) { $this->payment = $payment; return $this; } /** * Get payment * * @return string */ public function getPayment() { return $this->payment; } /** * Set comment * * @param string $comment * * @return Orders */ public function setComment($comment) { $this->comment = $comment; return $this; } /** * Get comment * * @return string */ public function getComment() { return $this->comment; } /** * Set discount * * @param float $discount * * @return Orders */ public function setDiscount($discount) { $this->discount = $discount; return $this; } /** * Get discount * * @return float */ public function getDiscount() { return $this->discount; } public function getDelivery(): ?OrderDelivery { return $this->delivery; } public function setDelivery(OrderDelivery $delivery): self { // set the owning side of the relation if necessary if ($delivery->getOrders() !== $this) { $delivery->setOrders($this); } $this->delivery = $delivery; return $this; } public function getPaymentReference(): ?string { return $this->payment_reference; } public function setPaymentReference(?string $payment_reference): self { $this->payment_reference = $payment_reference; return $this; } public function getConfirmed(): ?bool { return $this->confirmed; } public function setConfirmed(?bool $confirmed): self { $this->confirmed = $confirmed; return $this; } }