src/Entity/Products.php line 8

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProductsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=ProductsRepository::class)
  7.  */
  8. class Products
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="integer", nullable=true)
  18.      */
  19.     private $category_id;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity="App\Entity\Categorie", cascade={"persist"})
  22.      */
  23.     private $category;
  24.     /**
  25.      * @ORM\Column(type="integer", nullable=true)
  26.      */
  27.     private $subcategory_id;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity="App\Entity\Subcategorie", cascade={"persist"})
  30.      */
  31.     private $subcategory;
  32.     /**
  33.      * @ORM\Column(type="string", length=255)
  34.      */
  35.     private $productname;
  36.     /**
  37.      * @ORM\Column(type="string", length=255, nullable=true)
  38.      */
  39.     private $description;
  40.     /**
  41.      * @ORM\Column(type="float", nullable=true)
  42.      */
  43.     private $retailprice;
  44.     /**
  45.      * @ORM\Column(type="float", nullable=true)
  46.      */
  47.     private $wholesaleprice;
  48.     /**
  49.      * @ORM\Column(type="float", nullable=true)
  50.      */
  51.     private $semiretailprice;
  52.     /**
  53.      * @ORM\Column(type="string", length=255, nullable=true)
  54.      */
  55.     private $image;
  56.     /**
  57.      * @ORM\Column(type="integer")
  58.      */
  59.     private $status;
  60.     public function getId(): ?int
  61.     {
  62.         return $this->id;
  63.     }
  64.     public function getCategoryId(): ?int
  65.     {
  66.         return $this->category_id;
  67.     }
  68.     public function setCategoryId(?int $category_id): self
  69.     {
  70.         $this->category_id $category_id;
  71.         return $this;
  72.     }
  73.     public function getSubcategoryId(): ?int
  74.     {
  75.         return $this->subcategory_id;
  76.     }
  77.     public function setSubcategoryId(?int $subcategory_id): self
  78.     {
  79.         $this->subcategory_id $subcategory_id;
  80.         return $this;
  81.     }
  82.     public function getProductname(): ?string
  83.     {
  84.         return $this->productname;
  85.     }
  86.     public function setProductname(string $productname): self
  87.     {
  88.         $this->productname $productname;
  89.         return $this;
  90.     }
  91.     public function getDescription(): ?string
  92.     {
  93.         return $this->description;
  94.     }
  95.     public function setDescription(?string $description): self
  96.     {
  97.         $this->description $description;
  98.         return $this;
  99.     }
  100.     public function getRetailprice(): ?float
  101.     {
  102.         return $this->retailprice;
  103.     }
  104.     public function setRetailprice(?float $retailprice): self
  105.     {
  106.         $this->retailprice $retailprice;
  107.         return $this;
  108.     }
  109.     public function getWholesaleprice(): ?float
  110.     {
  111.         return $this->wholesaleprice;
  112.     }
  113.     public function setWholesaleprice(?float $wholesaleprice): self
  114.     {
  115.         $this->wholesaleprice $wholesaleprice;
  116.         return $this;
  117.     }
  118.     public function getSemiretailprice(): ?float
  119.     {
  120.         return $this->semiretailprice;
  121.     }
  122.     public function setSemiretailprice(?float $semiretailprice): self
  123.     {
  124.         $this->semiretailprice $semiretailprice;
  125.         return $this;
  126.     }
  127.     public function getImage(): ?string
  128.     {
  129.         return $this->image;
  130.     }
  131.     public function getUrlImage(): ?string
  132.     {
  133.         return "https://konsoplus-connect.com/public/images/product/";
  134.     }
  135.     public function setImage(?string $image): self
  136.     {
  137.         $this->image $image;
  138.         return $this;
  139.     }
  140.     public function getStatus(): ?int
  141.     {
  142.         return $this->status;
  143.     }
  144.     public function setStatus(int $status): self
  145.     {
  146.         $this->status $status;
  147.         return $this;
  148.     }
  149.     
  150.     public function setCategory(\App\Entity\Categorie $category null)
  151.     {
  152.         $this->category $category;
  153.         return $this;
  154.     }
  155.     public function getCategory()
  156.     {
  157.         return $this->category;
  158.     }
  159.     public function setSubcategory(\App\Entity\Subcategorie $subcategory null)
  160.     {
  161.         $this->subcategory $subcategory;
  162.         return $this;
  163.     }
  164.     public function getSubcategory()
  165.     {
  166.         return $this->subcategory;
  167.     }
  168. }