src/AtechNet/CoreBundle/Entity/CustomerContactPerson.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\AtechNet\CoreBundle\Entity;
  3. use App\AtechNet\CoreBundle\Repository\CustomerContactPersonRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Doctrine\ORM\Mapping\Entity;
  6. use Doctrine\ORM\Mapping\JoinColumn;
  7. use Doctrine\ORM\Mapping\ManyToOne;
  8. use Doctrine\ORM\Mapping\Table as Table;
  9. /**
  10.  * CustomerContactPerson
  11.  *
  12.  * @Table(name="customers__contact_persons")
  13.  * @Entity(repositoryClass=CustomerContactPersonRepository::class)
  14.  */
  15. class CustomerContactPerson extends AbstractEntity
  16. {
  17.     /**
  18.      * @var Customer
  19.      *
  20.      * @ManyToOne(targetEntity="Customer", inversedBy="contactPersons")
  21.      * @JoinColumn(name="customer_id", referencedColumnName="id")
  22.      */
  23.     private $customer;
  24.     /**
  25.      * @var string
  26.      *
  27.      * @ORM\Column(name="first_name", type="string", length=255)
  28.      */
  29.     private $firstName;
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(name="last_name", type="string", length=255)
  34.      */
  35.     private $lastName;
  36.     /**
  37.      * @var string
  38.      *
  39.      * @ORM\Column(name="phone_number", type="string", length=255, nullable=true)
  40.      */
  41.     private $phone;
  42.     /**
  43.      * @var string
  44.      *
  45.      * @ORM\Column(name="email", type="string", length=255, nullable=true)
  46.      */
  47.     private $email;
  48.     /**
  49.      * @return Customer
  50.      */
  51.     public function getCustomer()
  52.     {
  53.         return $this->customer;
  54.     }
  55.     /**
  56.      * @param Customer $customer
  57.      */
  58.     public function setCustomer($customer)
  59.     {
  60.         $this->customer = $customer;
  61.     }
  62.     /**
  63.      * Set firstName
  64.      *
  65.      * @param string $firstName
  66.      * @return CustomerContactPerson
  67.      */
  68.     public function setFirstName($firstName)
  69.     {
  70.         $this->firstName = $firstName;
  71.         return $this;
  72.     }
  73.     /**
  74.      * Get firstName
  75.      *
  76.      * @return string
  77.      */
  78.     public function getFirstName()
  79.     {
  80.         return $this->firstName;
  81.     }
  82.     /**
  83.      * Set lastName
  84.      *
  85.      * @param string $lastName
  86.      * @return CustomerContactPerson
  87.      */
  88.     public function setLastName($lastName)
  89.     {
  90.         $this->lastName = $lastName;
  91.         return $this;
  92.     }
  93.     /**
  94.      * Get lastName
  95.      *
  96.      * @return string
  97.      */
  98.     public function getLastName()
  99.     {
  100.         return $this->lastName;
  101.     }
  102.     /**
  103.      * @return string
  104.      */
  105.     public function getPhone()
  106.     {
  107.         return $this->phone;
  108.     }
  109.     /**
  110.      * @param string $phone
  111.      */
  112.     public function setPhone($phone)
  113.     {
  114.         $this->phone = $phone;
  115.     }
  116.     /**
  117.      * Set email
  118.      *
  119.      * @param string $email
  120.      * @return CustomerContactPerson
  121.      */
  122.     public function setEmail($email)
  123.     {
  124.         $this->email = $email;
  125.         return $this;
  126.     }
  127.     /**
  128.      * Get email
  129.      *
  130.      * @return string
  131.      */
  132.     public function getEmail()
  133.     {
  134.         return $this->email;
  135.     }
  136. }