<?php
namespace App\Entity;
use ApiPlatform\Metadata\ApiResource;
use App\Repository\BlogGpvRepository;
use Doctrine\ORM\Mapping as ORM;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use Symfony\Component\Serializer\Annotation\Groups;
use ApiPlatform\Metadata\ApiFilter;
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
#[ORM\Entity(repositoryClass: BlogGpvRepository::class)]
#[ApiResource(
normalizationContext: ['groups' => ['read']],
denormalizationContext: ['groups' => ['write']],
)]
#[Get]
#[GetCollection]
#[ApiFilter(SearchFilter::class, properties: ['city' => 'partial', 'street' => 'partial', 'building' => 'partial'])]
class BlogGpv
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
#[Groups(['read'])]
private ?int $id = null;
#[Groups(['read'])]
#[ORM\Column(length: 45, nullable: true)]
private ?string $city = null;
#[Groups(['read'])]
#[ORM\Column(length: 255, nullable: true)]
private ?string $street = null;
#[Groups(['read'])]
#[ORM\Column(length: 45, nullable: true)]
private ?string $building = null;
#[ORM\Column(length: 45, nullable: true)]
private ?string $apartment = null;
#[Groups(['read'])]
#[ORM\Column(length: 45, nullable: true)]
private ?string $group_type = null;
#[ORM\Column(length: 15, nullable: true)]
private ?string $code = null;
#[ORM\Column(length: 45, nullable: true)]
private ?string $rem_tech = null;
#[Groups(['read'])]
#[ORM\Column(nullable: true)]
private ?int $id_tree = null;
public function getId(): ?int
{
return $this->id;
}
public function getCity(): ?string
{
return $this->city;
}
public function setCity(?string $city): self
{
$this->city = $city;
return $this;
}
public function getStreet(): ?string
{
return $this->street;
}
public function setStreet(?string $street): self
{
$this->street = $street;
return $this;
}
public function getBuilding(): ?string
{
return $this->building;
}
public function setBuilding(?string $building): self
{
$this->building = $building;
return $this;
}
public function getApartment(): ?string
{
return $this->apartment;
}
public function setApartment(?string $apartment): self
{
$this->apartment = $apartment;
return $this;
}
public function getGroupType(): ?string
{
return $this->group_type;
}
public function setGroupType(?string $group_type): self
{
$this->group_type = $group_type;
return $this;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(?string $code): self
{
$this->code = $code;
return $this;
}
public function getRemTech(): ?string
{
return $this->rem_tech;
}
public function setRemTech(?string $rem_tech): self
{
$this->rem_tech = $rem_tech;
return $this;
}
public function getIdTree(): ?int
{
return $this->id_tree;
}
public function setIdTree(?int $id_tree): self
{
$this->id_tree = $id_tree;
return $this;
}
}