src/Admin/Modules/OfferGenerator/Entity/OfferGeneratorPriceListGroupItem.php line 12

  1. <?php
  2. namespace App\Admin\Modules\OfferGenerator\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Table(name="offer_generator_price_list_group_item")
  7.  * @ORM\Entity
  8.  */
  9. class OfferGeneratorPriceListGroupItem
  10. {
  11.     /**
  12.      * @ORM\Column(type="integer")
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue(strategy="AUTO")
  15.      */
  16.     private $id;
  17.     
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity="App\Admin\Modules\OfferGenerator\Entity\OfferGeneratorPriceListGroup", inversedBy="items")
  20.      * @ORM\JoinColumns({
  21.      *   @ORM\JoinColumn(name="id_offer_generator_price_list_group", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  22.      * })
  23.      */
  24.     private $group;
  25.     /**
  26.      * @ORM\Column(name="name", type="string", length=255, nullable=false)
  27.      */
  28.     private $name;   
  29.     /**
  30.      * @ORM\Column(name="price", type="decimal", precision=14, scale=2, nullable=false)
  31.      */
  32.     private $price;
  33.     
  34.     /**
  35.      * @ORM\Column(name="price_info", type="string", length=100, nullable=true)
  36.      */
  37.     private $priceInfo;
  38.     public function __toString()
  39.     {
  40.         return $this->name;
  41.     }
  42.     public function getId(): ?int
  43.     {
  44.         return $this->id;
  45.     }
  46.     
  47.     public function getName(): ?string
  48.     {
  49.         return $this->name;
  50.     }
  51.     public function setName(string $name): self
  52.     {
  53.         $this->name $name;
  54.         return $this;
  55.     }
  56.     public function getPrice(): ?string
  57.     {
  58.         return $this->price;
  59.     }
  60.     public function setPrice(string $price): self
  61.     {
  62.         $this->price $price;
  63.         return $this;
  64.     }
  65.     public function getGroup(): ?OfferGeneratorPriceListGroup
  66.     {
  67.         return $this->group;
  68.     }
  69.     public function setGroup(?OfferGeneratorPriceListGroup $group): self
  70.     {
  71.         $this->group $group;
  72.         return $this;
  73.     }
  74.     public function getPriceInfo(): ?string
  75.     {
  76.         return $this->priceInfo;
  77.     }
  78.     public function setPriceInfo(?string $priceInfo): self
  79.     {
  80.         $this->priceInfo $priceInfo;
  81.         return $this;
  82.     }  
  83. }