<?php namespace App\Entity; use App\Repository\ScoreRepository; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass=ScoreRepository::class) */ class Score { const PENDING = 0; const CONSOLIDATE_BY_RESTRICTED_ADMIN = 1; const CONSOLIDATE_BY_ADMIN = 2; const TRANSFORMED_TO_POINT = 3; /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="float") */ private $value = 0; /** * @ORM\ManyToOne(targetEntity=User::class, inversedBy="scores") */ private $user; /** * @ORM\Column(type="float") */ private $valueBooster = 0; /** * @ORM\Column(type="integer") */ private $state = 0; /** * @ORM\Column(type="integer", nullable=true) */ private $month; /** * @ORM\Column(type="integer", nullable=true) */ private $year; public function getId(): ?int { return $this->id; } public function getValue(): ?float { return $this->value; } public function setValue( float $value ): self { $this->value = $value; return $this; } public function getUser(): ?User { return $this->user; } public function setUser( ?User $user ): self { $this->user = $user; return $this; } public function getValueBooster(): ?float { return $this->valueBooster; } public function setValueBooster( ?float $valueBooster ): self { $this->valueBooster = $valueBooster; return $this; } public function getState(): ?int { return $this->state; } public function setState( int $state ): self { $this->state = $state; return $this; } public function getMonth(): ?int { return $this->month; } public function setMonth( ?int $month ): self { $this->month = $month; return $this; } public function getYear(): ?int { return $this->year; } public function setYear( ?int $year ): self { $this->year = $year; return $this; } }