<?phpnamespace App\Entity\Application;use App\Entity\Client;use App\Repository\Application\PointsRepository;use Doctrine\ORM\Mapping as ORM;use JMS\Serializer\Annotation as Serializer;/** * @ORM\Table(name="app_points") * @ORM\Entity(repositoryClass=PointsRepository::class) */class Points{ public const MAKE = 1; public const SPEND = -1; /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=Client::class, inversedBy="pointsHistory") * @ORM\JoinColumn(nullable=false) */ private $client; /** * @Serializer\Groups({"pointsHistory"}) * @Serializer\SerializedName("store") * @ORM\ManyToOne(targetEntity=Store::class, inversedBy="pointsHistory") */ private $store; /** * @Serializer\Groups({"pointsHistory"}) * @Serializer\SerializedName("type") * @ORM\Column(type="integer") */ private $type; /** * @Serializer\Groups({"pointsHistory"}) * @Serializer\SerializedName("points") * @ORM\Column(type="integer") */ private $points; /** * @ORM\Column(type="integer") */ private $beforePoints; /** * @ORM\Column(type="integer") */ private $afterPoints; /** * @Serializer\Groups({"pointsHistory"}) * @Serializer\SerializedName("bonus") * @ORM\ManyToOne(targetEntity=Bonus::class, inversedBy="pointsHistory") */ private $bonus; /** * @Serializer\Groups({"pointsHistory"}) * @Serializer\SerializedName("date") * * @ORM\Column(type="datetime") */ private $createts; public function getId(): ?int { return $this->id; } public function getClient(): ?Client { return $this->client; } public function setClient(?Client $client): self { $this->client = $client; return $this; } public function getStore(): ?Store { return $this->store; } public function setStore(?Store $store): self { $this->store = $store; return $this; } public function getType(): ?int { return $this->type; } public function setType(int $type): self { $this->type = $type; return $this; } public function getPoints(): ?int { return $this->points; } public function setPoints(int $points): self { $this->points = $points; return $this; } public function getBeforePoints(): ?int { return $this->beforePoints; } public function setBeforePoints(int $beforePoints): self { $this->beforePoints = $beforePoints; return $this; } public function getAfterPoints(): ?int { return $this->afterPoints; } public function setAfterPoints(int $afterPoints): self { $this->afterPoints = $afterPoints; return $this; } public function getBonus(): ?Bonus { return $this->bonus; } public function setBonus(?Bonus $bonus): self { $this->bonus = $bonus; return $this; } public function getCreatets(): ?\DateTimeInterface { return $this->createts; } public function setCreatets(\DateTimeInterface $createts): self { $this->createts = $createts; return $this; }}