* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace TimesheetBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; /** * Customer * * @ORM\Table(name="customers") * @ORM\Entity(repositoryClass="TimesheetBundle\Repository\CustomerRepository") * * @author Kevin Papst */ class Customer { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ private $id; /** * @var string * * @ORM\Column(name="name", type="string", length=255, nullable=false) */ private $name; /** * @var string * * @ORM\Column(name="comment", type="text", length=65535, nullable=true) */ private $comment; /** * @var Project[] * * @ORM\OneToMany(targetEntity="TimesheetBundle\Entity\Project", mappedBy="customer") */ private $projects; /** * @var boolean * * @ORM\Column(name="visible", type="boolean", nullable=false) */ private $visible = true; /** * @var string * * @ORM\Column(name="company", type="string", length=255, nullable=true) */ private $company; /** * @var integer * * @ORM\Column(name="vat", type="integer", length=2, nullable=true) * @Assert\Range(min = 0, max = 99) * */ private $vat; /** * @var string * * @ORM\Column(name="contact", type="string", length=255, nullable=true) */ private $contact; /** * @var string * * @ORM\Column(name="street", type="text", length=65535, nullable=true) */ private $address; /** * @var string * * @ORM\Column(name="country", type="string", length=2, nullable=true) * @Assert\NotBlank() */ private $country; /** * @var string * * @ORM\Column(name="phone", type="string", length=255, nullable=true) */ private $phone; /** * @var string * * @ORM\Column(name="fax", type="string", length=255, nullable=true) */ private $fax; /** * @var string * * @ORM\Column(name="mobile", type="string", length=255, nullable=true) */ private $mobile; /** * @var string * * @ORM\Column(name="mail", type="string", length=255, nullable=true) */ private $mail; /** * @var string * * @ORM\Column(name="homepage", type="string", length=255, nullable=true) */ private $homepage; /** * @var string * * @ORM\Column(name="timezone", type="string", length=255, nullable=false) * @Assert\NotBlank() */ private $timezone; /** * @return int */ public function getId() { return $this->id; } /** * Set name * * @param string $name * * @return Customer */ public function setName($name) { $this->name = $name; return $this; } /** * Get name * * @return string */ public function getName() { return $this->name; } /** * Set comment * * @param string $comment * * @return Customer */ public function setComment($comment) { $this->comment = $comment; return $this; } /** * Get comment * * @return string */ public function getComment() { return $this->comment; } /** * Set visible * * @param boolean $visible * * @return Customer */ public function setVisible($visible) { $this->visible = $visible; return $this; } /** * Get visible * * @return boolean */ public function getVisible() { return $this->visible; } /** * Set company * * @param string $company * * @return Customer */ public function setCompany($company) { $this->company = $company; return $this; } /** * Get company * * @return string */ public function getCompany() { return $this->company; } /** * Set vat * * @param integer $vat * * @return Customer */ public function setVat($vat) { $this->vat = $vat; return $this; } /** * Get vat * * @return integer */ public function getVat() { return $this->vat; } /** * Set contact * * @param string $contact * * @return Customer */ public function setContact($contact) { $this->contact = $contact; return $this; } /** * Get contact * * @return string */ public function getContact() { return $this->contact; } /** * @return string */ public function getAddress() { return $this->address; } /** * @param string $address * * @return Customer */ public function setAddress($address) { $this->address = $address; return $this; } /** * Set country * * @param string $country * * @return Customer */ public function setCountry($country) { $this->country = $country; return $this; } /** * Get country * * @return string */ public function getCountry() { return $this->country; } /** * Set phone * * @param string $phone * * @return Customer */ public function setPhone($phone) { $this->phone = $phone; return $this; } /** * Get phone * * @return string */ public function getPhone() { return $this->phone; } /** * Set fax * * @param string $fax * * @return Customer */ public function setFax($fax) { $this->fax = $fax; return $this; } /** * Get fax * * @return string */ public function getFax() { return $this->fax; } /** * Set mobile * * @param string $mobile * * @return Customer */ public function setMobile($mobile) { $this->mobile = $mobile; return $this; } /** * Get mobile * * @return string */ public function getMobile() { return $this->mobile; } /** * Set mail * * @param string $mail * * @return Customer */ public function setMail($mail) { $this->mail = $mail; return $this; } /** * Get mail * * @return string */ public function getMail() { return $this->mail; } /** * Set homepage * * @param string $homepage * * @return Customer */ public function setHomepage($homepage) { $this->homepage = $homepage; return $this; } /** * Get homepage * * @return string */ public function getHomepage() { return $this->homepage; } /** * Set timezone * * @param string $timezone * * @return Customer */ public function setTimezone($timezone) { $this->timezone = $timezone; return $this; } /** * Get timezone * * @return string */ public function getTimezone() { return $this->timezone; } /** * @param Project[] $projects * @return $this */ public function setProjects($projects) { $this->projects = $projects; return $this; } /** * @return Project[] */ public function getProjects() { return $this->projects; } /** * @return string */ public function __toString() { return $this->getName(); } }