src/Entity/OldPrice.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Product\ConfirmedProduct;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity()
  7.  * @ORM\Table(name="malys_old_price")
  8.  * @ORM\HasLifecycleCallbacks()
  9.  * @package App\Entity
  10.  */
  11. class OldPrice
  12. {
  13.     /**
  14.      * @var integer
  15.      *
  16.      * @ORM\Column(name="id", type="integer")
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      */
  20.     protected $id;
  21.     /**
  22.      * Many OldPrice have One Product
  23.      * @var ConfirmedProduct $product
  24.      * @ORM\ManyToOne(targetEntity="App\Entity\Product\ConfirmedProduct", inversedBy="oldPrices")
  25.      * @ORM\JoinColumn(name="product_id", referencedColumnName="id")
  26.      */
  27.     protected $product;
  28.     /**
  29.      * Many OldPrice have One Customer
  30.      * @var Customer $customer
  31.      * @ORM\ManyToOne(targetEntity="App\Entity\Customer", inversedBy="oldPrices")
  32.      * @ORM\JoinColumn(name="customer_id", referencedColumnName="id")
  33.      */
  34.     protected $customer;
  35.     /**
  36.      * @var float
  37.      *
  38.      * @ORM\Column(name="price", type="float", nullable=false)
  39.      */
  40.     protected $price;
  41.     /**
  42.      * @return int
  43.      */
  44.     public function getId()
  45.     {
  46.         return $this->id;
  47.     }
  48.     /**
  49.      * @param int $id
  50.      */
  51.     public function setId($id)
  52.     {
  53.         $this->id $id;
  54.     }
  55.     /**
  56.      * @return ConfirmedProduct
  57.      */
  58.     public function getProduct()
  59.     {
  60.         return $this->product;
  61.     }
  62.     /**
  63.      * @param ConfirmedProduct $product
  64.      */
  65.     public function setProduct(ConfirmedProduct $product)
  66.     {
  67.         $this->product $product;
  68.     }
  69.     /**
  70.      * @return Customer
  71.      */
  72.     public function getCustomer()
  73.     {
  74.         return $this->customer;
  75.     }
  76.     /**
  77.      * @param Customer $customer
  78.      */
  79.     public function setCustomer(Customer $customer)
  80.     {
  81.         $this->customer $customer;
  82.     }
  83.     /**
  84.      * @return float
  85.      */
  86.     public function getPrice()
  87.     {
  88.         return $this->price;
  89.     }
  90.     /**
  91.      * @param float $price
  92.      */
  93.     public function setPrice($price)
  94.     {
  95.         $this->price $price;
  96.     }
  97. }