/
home
/
ubuntu
/
html
/
mixchief_app
/
src
/
Entity
/
Upload File
HOME
<?php namespace App\Entity; use Doctrine\ORM\Mapping as ORM; use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\ArrayCollection; /** * Supply * * @ORM\Table(name="supply") * @ORM\Entity(repositoryClass="App\Repository\SupplyRepository") */ class Supply { /** * @var int * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var \DateTime * * @ORM\Column(name="date", type="datetime") */ private $date; /** * @var string * * @ORM\Column(name="name", type="string", length=255, nullable=true) */ private $name; /** * @var int * * @ORM\ManyToOne(targetEntity="App\Entity\Supplier", inversedBy="supply") */ private $supplier; /** * @ORM\OneToMany(targetEntity="App\Entity\SupplyItem", mappedBy="supply") **/ // private $supplyItems; /** * @var float * * @ORM\Column(name="total", type="float") */ private $total; /** * @var int * * @ORM\Column(name="user_id", type="integer", nullable=true) */ private $userId; // public function __construct() // { // $this->supplyItems = new ArrayCollection(); // } /** * 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; } /** * Get id * * @return int */ public function getId() { return $this->id; } /** * Set date * * @param \DateTime $date * * @return Supply */ public function setDate($date) { $this->date = $date; return $this; } /** * Get date * * @return \DateTime */ public function getDate() { return $this->date; } /** * Set name * * @param string $name * * @return Supply */ public function setName($name) { $this->name = $name; return $this; } /** * Get name * * @return string */ public function getName() { return $this->name; } /** * Set supplier * * @param integer $supplier * * @return Supply */ public function setSupplier($supplier) { $this->supplier = $supplier; return $this; } /** * Get supplier * * @return int */ public function getSupplier() { return $this->supplier; } /** * Get supplier * * @return int */ // public function getSupplyItems(): Collection // { // return $this->supplyItems; // } /** * Set total * * @param float $total * * @return Supply */ public function setTotal($total) { $this->total = $total; return $this; } /** * Get total * * @return float */ public function getTotal() { return $this->total; } }