osm-commerces/src/Entity/Demande.php
2025-07-16 17:00:09 +02:00

177 lines
3.5 KiB
PHP

<?php
namespace App\Entity;
use App\Repository\DemandeRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: DemandeRepository::class)]
class Demande
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $query = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $email = null;
#[ORM\Column(nullable: true)]
private ?int $insee = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $createdAt = null;
#[ORM\Column(length: 50)]
private ?string $status = 'new';
#[ORM\Column(length: 255, nullable: true)]
private ?string $placeUuid = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $lastContactAttempt = null;
#[ORM\ManyToOne]
private ?Place $place = null;
#[ORM\Column(length: 10, nullable: true)]
private ?string $osmObjectType = null;
#[ORM\Column(nullable: true)]
private ?int $osmId = null;
public function __construct()
{
$this->createdAt = new \DateTime();
$this->status = 'new';
}
public function getId(): ?int
{
return $this->id;
}
public function getQuery(): ?string
{
return $this->query;
}
public function setQuery(string $query): static
{
$this->query = $query;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): static
{
$this->email = $email;
return $this;
}
public function getInsee(): ?int
{
return $this->insee;
}
public function setInsee(?int $insee): static
{
$this->insee = $insee;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): static
{
$this->createdAt = $createdAt;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(string $status): static
{
$this->status = $status;
return $this;
}
public function getPlaceUuid(): ?string
{
return $this->placeUuid;
}
public function setPlaceUuid(?string $placeUuid): static
{
$this->placeUuid = $placeUuid;
return $this;
}
public function getLastContactAttempt(): ?\DateTimeInterface
{
return $this->lastContactAttempt;
}
public function setLastContactAttempt(?\DateTimeInterface $lastContactAttempt): static
{
$this->lastContactAttempt = $lastContactAttempt;
return $this;
}
public function getPlace(): ?Place
{
return $this->place;
}
public function setPlace(?Place $place): static
{
$this->place = $place;
return $this;
}
public function getOsmObjectType(): ?string
{
return $this->osmObjectType;
}
public function setOsmObjectType(?string $osmObjectType): static
{
$this->osmObjectType = $osmObjectType;
return $this;
}
public function getOsmId(): ?int
{
return $this->osmId;
}
public function setOsmId(?int $osmId): static
{
$this->osmId = $osmId;
return $this;
}
}