<?php/* * This file is part of the kProjet project. * * (c) Kodiom <info@kodiom.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */namespace App\Entity;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Validator\Constraints as Assert;use ApiPlatform\Core\Annotation\ApiResource;/** * Analytic * * @ApiResource * @ORM\Table() * @ORM\Entity(repositoryClass="App\Repository\AnalyticRepository") */class Analytic{ /** * @var int * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var string * * @ORM\Column(name="type", type="string", length=30) * * @Assert\NotBlank() */ private $type; /** * @var string * * @ORM\Column(type="string", length=30) * * @Assert\NotBlank() */ private $mode; /** * @var string * * @ORM\Column(type="string", length=100) * * @Assert\NotBlank() */ private $userId; /** * @var date * * @ORM\Column(name="dateInfo", type="datetime") */ private $dateInfo; /** * Constructor of Analytic Entity */ public function __construct() { $this->dateInfo = new \DateTime; } public function __toString() { return ($this->getType()) ? $this->getType() : ''; } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Get type * * @return string */ public function getType() { return $this->type; } /** * Set type * * @param string $type * * @return Analytic */ public function setType($type) { $this->type = $type; return $this; } /** * Get mode * * @return string */ public function getMode() { return $this->mode; } /** * Set mode * * @param string $mode * * @return Push */ public function setMode($mode) { $this->mode = $mode; return $this; } /** * Get userId * * @return string */ public function getUserId() { return $this->userId; } /** * Set userId * * @param string $userId * * @return Push */ public function setUserId($userId) { $this->userId = $userId; return $this; } /** * Get dateInfo * * @return date */ public function getDateInfo() { return $this->dateInfo; } /** * Set dateInfo * * @param date $dateInfo * * @return Analytic */ public function setDateInfo($dateInfo) { $this->dateInfo = $dateInfo; return $this; }}