src/Entity/System/TaxonomyStatistic.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * Class TaxonomyStatistic
  6.  *
  7.  * @ORM\Table(name="taxonomy_statistics", indexes={
  8.  *
  9.  *      @ORM\Index(name="taxonomy_statistics_type_index", columns={"type"})
  10.  *  })
  11.  *
  12.  * @ORM\Entity(repositoryClass="App\Repository\System\TaxonomyStatisticRepository")
  13.  */
  14. class TaxonomyStatistic
  15. {
  16.     public const TYPE_REFERENCES 'references';
  17.     public const TYPE_TOTAL_NUM_PRODUCTS_TAXONOMY 'total';
  18.     public const DEFAULT_TAXONOMY null;
  19.     /**
  20.      * @ORM\Column(name="id", type="integer")
  21.      *
  22.      * @ORM\Id
  23.      *
  24.      * @ORM\GeneratedValue(strategy="AUTO")
  25.      */
  26.     private int $id;
  27.     /**
  28.      * @ORM\Column(type="string", name="type", length=100)
  29.      */
  30.     private string $type;
  31.     /**
  32.      * @ORM\Column(type="integer", name="id_taxonomy", nullable=true)
  33.      */
  34.     private ?int $taxonomyId;
  35.     /**
  36.      * @ORM\Column(type="integer", name="num_products", nullable=true)
  37.      */
  38.     private ?int $numProducts;
  39.     public function getId(): int
  40.     {
  41.         return $this->id;
  42.     }
  43.     /**
  44.      * @return string
  45.      */
  46.     public function getType(): string
  47.     {
  48.         return $this->type;
  49.     }
  50.     /**
  51.      * @return int
  52.      */
  53.     public function getTaxonomyId(): int
  54.     {
  55.         return $this->taxonomyId;
  56.     }
  57.     public function getNumProducts(): ?int
  58.     {
  59.         return $this->numProducts;
  60.     }
  61.     /**
  62.      * @param string $type
  63.      */
  64.     public function setType(string $type): void
  65.     {
  66.         $this->type $type;
  67.     }
  68.     /**
  69.      * @param int|null $taxonomyId
  70.      */
  71.     public function setTaxonomyId(?int $taxonomyId): void
  72.     {
  73.         $this->taxonomyId $taxonomyId;
  74.     }
  75.     public function setNumProducts(?int $numProducts): void
  76.     {
  77.         $this->numProducts $numProducts;
  78.     }
  79. }