<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repository\CustomerDetailRepository")
*/
class CustomerDetail
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private $customerNumber;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $country;
/**
* @ORM\Column(type="string", length=20, nullable=true)
*/
private $city;
/**
* @ORM\Column(type="string", length=50, nullable=true)
*/
private $companyName;
/**
* @ORM\Column(type="string", length=30, nullable=true)
*/
private $state;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $businessType;
/**
* @ORM\Column(type="string", length=50, nullable=true)
* @Assert\Email(
* message = "Please enter valid email."
* )
*/
private $centralEmailAddress;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $street;
/**
* @ORM\Column(type="string", length=30, nullable=true)
* @Assert\Type(type="digit",message="Phone number has to be numeric")
* @Assert\Regex(
* pattern="/^[0-9]+$/",
* message="Phone number has to be numeric"
* )
*/
private $centralPhoneNumber;
/**
* @ORM\Column(type="string", length=15, nullable=true)
*/
private $zipCode;
/**
* @ORM\Column(type="string", length=30, nullable=true)
*/
private $vatNumber;
/**
* @ORM\OneToOne(targetEntity="App\Entity\User", inversedBy="customerDetail", cascade={"persist"})
*/
private $customer;
public function __toString()
{
return $this->getCompanyName();
}
public function getId(): ?int
{
return $this->id;
}
public function getCustomerNumber(): ?string
{
return $this->customerNumber;
}
public function setCustomerNumber(?string $customerNumber): self
{
$this->customerNumber = $customerNumber;
return $this;
}
public function getCity(): ?string
{
return $this->city;
}
public function setCity(?string $city): self
{
$this->city = $city;
return $this;
}
public function getCompanyName(): ?string
{
return $this->companyName;
}
public function setCompanyName(?string $companyName): self
{
$this->companyName = $companyName;
return $this;
}
public function getState(): ?string
{
return $this->state;
}
public function setState(?string $state): self
{
$this->state = $state;
return $this;
}
public function getBusinessType(): ?string
{
return $this->businessType;
}
public function setBusinessType(?string $businessType): self
{
$this->businessType = $businessType;
return $this;
}
public function getCentralEmailAddress(): ?string
{
return $this->centralEmailAddress;
}
public function setCentralEmailAddress(?string $centralEmailAddress): self
{
$this->centralEmailAddress = $centralEmailAddress;
return $this;
}
public function getStreet(): ?string
{
return $this->street;
}
public function setStreet(?string $street): self
{
$this->street = $street;
return $this;
}
public function getCentralPhoneNumber(): ?string
{
return $this->centralPhoneNumber;
}
public function setCentralPhoneNumber(?string $centralPhoneNumber): self
{
$this->centralPhoneNumber = $centralPhoneNumber;
return $this;
}
public function getZipCode(): ?string
{
return $this->zipCode;
}
public function setZipCode(?string $zipCode): self
{
$this->zipCode = $zipCode;
return $this;
}
public function getVatNumber(): ?string
{
return $this->vatNumber;
}
public function setVatNumber(?string $vatNumber): self
{
$this->vatNumber = $vatNumber;
return $this;
}
public function getCustomer(): ?User
{
return $this->customer;
}
public function setCustomer(?User $customer): self
{
$this->customer = $customer;
return $this;
}
public function getCountry(): ?string
{
return $this->country;
}
public function setCountry(?string $country): self
{
$this->country = $country;
return $this;
}
}