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

Open in your IDE?
  1. <?php
  2. namespace App\AtechNet\CoreBundle\Entity;
  3. use App\AtechNet\CoreBundle\Repository\CustomerEmailRepository;
  4. use Doctrine\ORM\Mapping\Column;
  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.  * CustomerEmail
  11.  *
  12.  * @Table(name="customers__emails")
  13.  * @Entity(repositoryClass=CustomerEmailRepository::class)
  14.  */
  15. class CustomerEmail extends AbstractEntity
  16. {
  17.     /**
  18.      * @var Customer
  19.      *
  20.      * @ManyToOne(targetEntity="Customer", inversedBy="emails")
  21.      * @JoinColumn(name="customer_id", referencedColumnName="id")
  22.      */
  23.     private $customer;
  24.     /**
  25.      * @var string
  26.      *
  27.      * @Column(name="email", type="string", length=255)
  28.      */
  29.     private $email;
  30.     /**
  31.      * @return Customer
  32.      */
  33.     public function getCustomer()
  34.     {
  35.         return $this->customer;
  36.     }
  37.     /**
  38.      * @param Customer $customer
  39.      */
  40.     public function setCustomer($customer)
  41.     {
  42.         $this->customer = $customer;
  43.     }
  44.     /**
  45.      * Set email
  46.      *
  47.      * @param string $email
  48.      * @return CustomerEmail
  49.      */
  50.     public function setEmail($email)
  51.     {
  52.         $this->email = $email;
  53.         return $this;
  54.     }
  55.     /**
  56.      * Get email
  57.      *
  58.      * @return string
  59.      */
  60.     public function getEmail()
  61.     {
  62.         return $this->email;
  63.     }
  64. }