src/Entity/BusinessClient/PriceRange.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\BusinessClient;
  3. use App\Entity\BusinessClient;
  4. use App\Repository\BusinessClient\PriceRangeRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=PriceRangeRepository::class)
  8.  * @ORM\Table(name="business_client_price_range")
  9.  */
  10. class PriceRange
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="float")
  20.      */
  21.     private $minKG;
  22.     /**
  23.      * @ORM\Column(type="float")
  24.      */
  25.     private $maxKG;
  26.     /**
  27.      * @ORM\Column(type="float")
  28.      */
  29.     private $price;
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity=BusinessClient::class, inversedBy="priceRanges")
  32.      * @ORM\JoinColumn(nullable=false)
  33.      */
  34.     private $BusinessClient;
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getMinKG(): ?float
  40.     {
  41.         return $this->minKG;
  42.     }
  43.     public function setMinKG(float $minKG): self
  44.     {
  45.         $this->minKG $minKG;
  46.         return $this;
  47.     }
  48.     public function getMaxKG(): ?float
  49.     {
  50.         return $this->maxKG;
  51.     }
  52.     public function setMaxKG(float $maxKG): self
  53.     {
  54.         $this->maxKG $maxKG;
  55.         return $this;
  56.     }
  57.     public function getPrice(): ?float
  58.     {
  59.         return $this->price;
  60.     }
  61.     public function setPrice(float $price): self
  62.     {
  63.         $this->price $price;
  64.         return $this;
  65.     }
  66.     public function getBusinessClient(): ?BusinessClient
  67.     {
  68.         return $this->BusinessClient;
  69.     }
  70.     public function setBusinessClient(?BusinessClient $BusinessClient): self
  71.     {
  72.         $this->BusinessClient $BusinessClient;
  73.         return $this;
  74.     }
  75.     public function __toString()
  76.     {
  77.         return $this->minKG 'KG - ' $this->maxKG 'KG -> ' $this->price '$';
  78.     }
  79. }