src/Entity/Api/Statistic.php line 16

Open in your IDE?
  1. <?php
  2. namespace  App\Entity\Api;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use ApiPlatform\Core\Annotation\ApiResource;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. use ApiPlatform\Core\Annotation\ApiFilter;
  7. use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
  8. /**
  9.  * @ORM\Entity(repositoryClass="App\Repository\StatisticRepository")
  10.  * @ApiResource(
  11.  * collectionOperations={"get"},
  12.  * itemOperations={"get"})
  13.  */
  14. class Statistic {
  15.    
  16.     /**
  17.      * @ORM\Id
  18.      * @ORM\Column(type="string")
  19.      */
  20.     protected $id;
  21.     protected $data = [];
  22.     /**
  23.      * Get the value of data
  24.      */ 
  25.     public function getData()
  26.     {
  27.         return $this->data;
  28.     }
  29.     /**
  30.      * Set the value of data
  31.      *
  32.      * @return  self
  33.      */ 
  34.     public function setData($data)
  35.     {
  36.         $this->data $data;
  37.         return $this;
  38.     }
  39.    
  40.     /**
  41.      * Get the value of id
  42.      */ 
  43.     public function getId()
  44.     {
  45.         return $this->id;
  46.     }
  47.     /**
  48.      * Set the value of id
  49.      *
  50.      * @return  self
  51.      */ 
  52.     public function setId($id)
  53.     {
  54.         $this->id $id;
  55.         return $this;
  56.     }
  57. }