src/AtechNet/CoreBundle/Entity/CustomerSalesManagerChangelog.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\AtechNet\CoreBundle\Entity;
  3. use Doctrine\ORM\Mapping\Entity;
  4. use Doctrine\ORM\Mapping\HasLifecycleCallbacks;
  5. use Doctrine\ORM\Mapping\JoinColumn;
  6. use Doctrine\ORM\Mapping\ManyToOne;
  7. use Doctrine\ORM\Mapping\Table as Table;
  8. use Symfony\Component\Validator\Constraints as Assert;
  9. /**
  10.  * CustomerSalesManagerChangelog
  11.  *
  12.  * @Table(name="customers_sales_manager_changelog")
  13.  * @Entity
  14.  * @HasLifecycleCallbacks
  15.  */
  16. class CustomerSalesManagerChangelog extends AbstractSignedEntity
  17. {
  18.     /**
  19.      * @var Customer
  20.      *
  21.      * @Assert\NotNull
  22.      *
  23.      * @ManyToOne(targetEntity="Customer", inversedBy="salesManagerChangelog")
  24.      * @JoinColumn(name="customer_id", referencedColumnName="id")
  25.      */
  26.     private $customer;
  27.     /**
  28.      * @var User
  29.      *
  30.      * @Assert\NotNull
  31.      *
  32.      * @ManyToOne(targetEntity="User")
  33.      * @JoinColumn(name="sales_manager_id", referencedColumnName="id")
  34.      */
  35.     private $salesManager;
  36.     /**
  37.      * @return \AtechNet\CoreBundle\Entity\Customer
  38.      */
  39.     public function getCustomer()
  40.     {
  41.         return $this->customer;
  42.     }
  43.     /**
  44.      * @param \AtechNet\CoreBundle\Entity\Customer $customer
  45.      */
  46.     public function setCustomer(Customer $customer)
  47.     {
  48.         $this->customer = $customer;
  49.     }
  50.     /**
  51.      * @return \AtechNet\CoreBundle\Entity\User
  52.      */
  53.     public function getSalesManager()
  54.     {
  55.         return $this->salesManager;
  56.     }
  57.     /**
  58.      * @param \AtechNet\CoreBundle\Entity\User $salesManager
  59.      */
  60.     public function setSalesManager(User $salesManager)
  61.     {
  62.         $this->salesManager = $salesManager;
  63.     }
  64. }