/
home
/
obinna
/
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; /** * Supplier * * @ORM\Table(name="supplier") * @ORM\Entity(repositoryClass="App\Repository\SupplierRepository") */ class Supplier { /** * @var int * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var string * * @ORM\Column(name="name", type="string", length=255) */ private $name; /** * @var string * * @ORM\Column(name="address", type="string", length=255, nullable=true) */ private $address; /** * @var int * * @ORM\Column(name="telephone", type="string", length=255, nullable=true) */ private $telephone; /** * @var string * * @ORM\Column(name="email", type="string", length=255, nullable=true) */ private $email; /** * @var int * * @ORM\Column(name="user_id", type="integer", nullable=true) */ private $userId; /** * @var Collection * * @ORM\OneToMany(targetEntity="App\Entity\Supply", mappedBy="supplier") */ private $supply; function __construct() { $this->supply = 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 name * * @param string $name * * @return Supplier */ public function setName($name) { $this->name = $name; return $this; } /** * Get name * * @return string */ public function getName() { return $this->name; } /** * Set address * * @param string $address * * @return Supplier */ public function setAddress($address) { $this->address = $address; return $this; } /** * Get address * * @return string */ public function getAddress() { return $this->address; } /** * Set telephone * * @param integer $telephone * * @return Supplier */ public function setTelephone($telephone) { $this->telephone = $telephone; return $this; } /** * Get telephone * * @return int */ public function getTelephone() { return $this->telephone; } /** * Set email * * @param string $email * * @return Supplier */ public function setEmail($email) { $this->email = $email; return $this; } /** * Get email * * @return string */ public function getEmail() { return $this->email; } /** * Get Supplies * * @return ArrayCollection */ public function getSupply() { return $this->supply; } /** * Remove Supplies * * @return ArrayCollection */ public function removeSupplies() { return $this->supply->clear(); } }