src/Entity/SupplierCustomerNoTP.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use DateTime;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * Class SupplierCustomerNoTP
  7.  *
  8.  * @ORM\Entity
  9.  * @ORM\Entity(repositoryClass="App\Repository\SupplierCustomerNoTPRepository")
  10.  * @ORM\Table(name="malys_supplier_customer_no_tp")
  11.  * @ORM\HasLifecycleCallbacks()
  12.  * @package App\Entity
  13.  */
  14. class SupplierCustomerNoTP
  15. {
  16.     /**
  17.      * @var integer
  18.      *
  19.      * @ORM\Column(name="id", type="integer")
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     protected $id;
  24.     /**
  25.      * @var Customer
  26.      * @ORM\ManyToOne(targetEntity="Customer")
  27.      * @ORM\JoinColumn(name="customer_id", referencedColumnName="id")
  28.      */
  29.     protected $customer;
  30.     /**
  31.      * @var Supplier
  32.      *
  33.      * @ORM\ManyToOne(targetEntity="Supplier")
  34.      * @ORM\JoinColumn(name="supplier_id", referencedColumnName="id")
  35.      */
  36.     protected $supplier;
  37.     /**
  38.      * @var DateTime
  39.      *
  40.      * @ORM\Column(name="createdAt", type="datetime", nullable=false)
  41.      */
  42.     protected $createdAt;
  43.     /**
  44.      * @var DateTime
  45.      *
  46.      * @ORM\Column(name="updatedAt", type="datetime", nullable=true)
  47.      */
  48.     protected $updatedAt;
  49.     /**
  50.      * @return int
  51.      */
  52.     public function getId()
  53.     {
  54.         return $this->id;
  55.     }
  56.     /**
  57.      * @param int $id
  58.      */
  59.     public function setId($id)
  60.     {
  61.         $this->id $id;
  62.     }
  63.     /**
  64.      * @return Customer
  65.      */
  66.     public function getCustomer()
  67.     {
  68.         return $this->customer;
  69.     }
  70.     /**
  71.      * @param Customer $customer
  72.      */
  73.     public function setCustomer(Customer $customer)
  74.     {
  75.         $this->customer $customer;
  76.     }
  77.     /**
  78.      * @return Supplier
  79.      */
  80.     public function getSupplier()
  81.     {
  82.         return $this->supplier;
  83.     }
  84.     /**
  85.      * @param Supplier $supplier
  86.      */
  87.     public function setSupplier(Supplier $supplier)
  88.     {
  89.         $this->supplier $supplier;
  90.     }
  91.     /**
  92.      * @return DateTime
  93.      */
  94.     public function getCreatedAt()
  95.     {
  96.         return $this->createdAt;
  97.     }
  98.     /**
  99.      * Set createdAt
  100.      *
  101.      * @return SupplierCustomerNoTP
  102.      * @ORM\PrePersist
  103.      */
  104.     public function setCreatedAt()
  105.     {
  106.         $this->createdAt = new DateTime();
  107.         $this->updatedAt = new DateTime();
  108.         return $this;
  109.     }
  110.     /**
  111.      * @return DateTime
  112.      */
  113.     public function getUpdatedAt()
  114.     {
  115.         return $this->updatedAt;
  116.     }
  117.     /**
  118.      * Set updatedAt
  119.      *
  120.      * @return SupplierCustomerNoTP
  121.      * @ORM\PreUpdate
  122.      */
  123.     public function setUpdatedAt()
  124.     {
  125.         $this->updatedAt = new DateTime();
  126.         return $this;
  127.     }
  128. }