src/Entity/SupplierProductService.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use DateTime;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * SupplierProductService
  7.  *
  8.  * @ORM\Table(name="supplier_product_service")
  9.  * @ORM\HasLifecycleCallbacks()
  10.  * @ORM\Entity(repositoryClass="App\Repository\SupplierProductServiceRepository")
  11.  */
  12. class SupplierProductService
  13. {
  14.     /**
  15.      * @var int
  16.      *
  17.      * @ORM\Column(name="id", type="integer")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @var float
  24.      *
  25.      * @ORM\Column(name="price", type="float")
  26.      */
  27.     private $price;
  28.     /**
  29.      * @var DateTime
  30.      *
  31.      * @ORM\Column(name="createdAt", type="datetime")
  32.      */
  33.     private $createdAt;
  34.     /**
  35.      * @var DateTime
  36.      *
  37.      * @ORM\Column(name="updatedAt", type="datetime")
  38.      */
  39.     private $updatedAt;
  40.     /**
  41.      * @var Supplier
  42.      *
  43.      * @ORM\ManyToOne(targetEntity="Supplier", inversedBy="productServices")
  44.      * @ORM\JoinColumn(name="supplier_id", referencedColumnName="id")
  45.      */
  46.     protected $supplier;
  47.     /**
  48.      * @var ProductService
  49.      * @ORM\ManyToOne(targetEntity="ProductService")
  50.      * @ORM\JoinColumn(name="product_service_id", referencedColumnName="id")
  51.      */
  52.     protected $productService;
  53.     /**
  54.      * Get id
  55.      *
  56.      * @return int
  57.      */
  58.     public function getId()
  59.     {
  60.         return $this->id;
  61.     }
  62.     /**
  63.      * Set price
  64.      *
  65.      * @param float $price
  66.      *
  67.      * @return SupplierProductService
  68.      */
  69.     public function setPrice($price)
  70.     {
  71.         $this->price $price;
  72.         return $this;
  73.     }
  74.     /**
  75.      * Get price
  76.      *
  77.      * @return float
  78.      */
  79.     public function getPrice()
  80.     {
  81.         return $this->price;
  82.     }
  83.     /**
  84.      * Set createdAt
  85.      *
  86.      * @param DateTime $createdAt
  87.      *
  88.      * @return SupplierProductService
  89.      */
  90.     public function setCreatedAt($createdAt)
  91.     {
  92.         $this->createdAt $createdAt;
  93.         return $this;
  94.     }
  95.     /**
  96.      * Get createdAt
  97.      *
  98.      * @return DateTime
  99.      */
  100.     public function getCreatedAt()
  101.     {
  102.         return $this->createdAt;
  103.     }
  104.     /**
  105.      * Set updatedAt
  106.      *
  107.      * @param DateTime $updatedAt
  108.      *
  109.      * @return SupplierProductService
  110.      */
  111.     public function setUpdatedAt($updatedAt)
  112.     {
  113.         $this->updatedAt $updatedAt;
  114.         return $this;
  115.     }
  116.     /**
  117.      * Get updatedAt
  118.      *
  119.      * @return DateTime
  120.      */
  121.     public function getUpdatedAt()
  122.     {
  123.         return $this->updatedAt;
  124.     }
  125.     /**
  126.      * @ORM\PrePersist()
  127.      */
  128.     public function creationDate()
  129.     {
  130.         $this->createdAt = new DateTime();
  131.         $this->updatedAt = new DateTime();
  132.         return $this;
  133.     }
  134.     /**
  135.      * @ORM\PreUpdate
  136.      */
  137.     public function updatedDate()
  138.     {
  139.         $this->updatedAt = new DateTime();
  140.         return $this;
  141.     }
  142.     /**
  143.      * @return Supplier
  144.      */
  145.     public function getSupplier()
  146.     {
  147.         return $this->supplier;
  148.     }
  149.     /**
  150.      * @param Supplier $supplier
  151.      */
  152.     public function setSupplier($supplier)
  153.     {
  154.         $this->supplier $supplier;
  155.     }
  156.     /**
  157.      * @return ProductService
  158.      */
  159.     public function getProductService()
  160.     {
  161.         return $this->productService;
  162.     }
  163.     /**
  164.      * @param ProductService $productService
  165.      */
  166.     public function setProductService($productService)
  167.     {
  168.         $this->productService $productService;
  169.     }
  170. }