src/Entity/System/CustomerMigration.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * CustomerMigration
  6.  *
  7.  * @ORM\Table(name="ps_customer_migration")
  8.  *
  9.  * @ORM\Entity(repositoryClass="App\Repository\System\CustomerMigrationRepository")
  10.  */
  11. class CustomerMigration
  12. {
  13.     /**
  14.      * @ORM\Id()
  15.      *
  16.      * @ORM\GeneratedValue()
  17.      *
  18.      * @ORM\Column(type="integer", length=11, name="id_customer_migration")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @var Customer
  23.      *
  24.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Customer", inversedBy="customerMigration")
  25.      *
  26.      * @ORM\JoinColumn(name="id_customer", referencedColumnName="id_customer")
  27.      */
  28.     private $customer;
  29.     /**
  30.      * @var Customer
  31.      *
  32.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Customer")
  33.      *
  34.      * @ORM\JoinColumn(name="id_customer_old", referencedColumnName="id_customer")
  35.      */
  36.     private $customerOld;
  37.     /**
  38.      * @var \DateTime
  39.      *
  40.      * @ORM\Column(type="datetime")
  41.      */
  42.     private $dateAdd;
  43.     /**
  44.      * @return mixed
  45.      */
  46.     public function getId()
  47.     {
  48.         return $this->id;
  49.     }
  50.     /**
  51.      * @param mixed $id
  52.      *
  53.      * @return CustomerMigration
  54.      */
  55.     public function setId($id): CustomerMigration
  56.     {
  57.         $this->id $id;
  58.         return $this;
  59.     }
  60.     /**
  61.      * @return Customer
  62.      */
  63.     public function getCustomer(): Customer
  64.     {
  65.         return $this->customer;
  66.     }
  67.     /**
  68.      * @param Customer $customer
  69.      *
  70.      * @return CustomerMigration
  71.      */
  72.     public function setCustomer(Customer $customer): CustomerMigration
  73.     {
  74.         $this->customer $customer;
  75.         return $this;
  76.     }
  77.     /**
  78.      * @return Customer
  79.      */
  80.     public function getCustomerOld(): Customer
  81.     {
  82.         return $this->customerOld;
  83.     }
  84.     /**
  85.      * @param Customer $customerOld
  86.      *
  87.      * @return CustomerMigration
  88.      */
  89.     public function setCustomerOld(Customer $customerOld): CustomerMigration
  90.     {
  91.         $this->customerOld $customerOld;
  92.         return $this;
  93.     }
  94.     /**
  95.      * @return \DateTime
  96.      */
  97.     public function getDateAdd(): \DateTime
  98.     {
  99.         return $this->dateAdd;
  100.     }
  101.     /**
  102.      * @param \DateTime $dateAdd
  103.      *
  104.      * @return CustomerMigration
  105.      */
  106.     public function setDateAdd(\DateTime $dateAdd): CustomerMigration
  107.     {
  108.         $this->dateAdd $dateAdd;
  109.         return $this;
  110.     }
  111.     /**
  112.      * @param Customer $newCustomer
  113.      * @param $oldCustomer
  114.      * @param \DateTime $migrationDate
  115.      */
  116.     public function setMigrationValues(Customer $newCustomer$oldCustomer, \DateTime $migrationDate): void
  117.     {
  118.         $this->customer $newCustomer;
  119.         $this->customerOld $oldCustomer;
  120.         $this->dateAdd $migrationDate;
  121.     }
  122. }