ajout view email proposé pour les commerçants

This commit is contained in:
Tykayn 2025-06-19 10:20:40 +02:00 committed by tykayn
parent e71177dee1
commit dbe2f62c45
12 changed files with 275 additions and 12 deletions

View file

@ -103,6 +103,43 @@ class Place
#[ORM\Column(nullable: true)]
private ?int $habitants = null;
#[ORM\Column(nullable: true)]
private ?\DateTime $osm_data_date = null;
public function getPlaceTypeName(): ?string
{
if ($this->main_tag == 'amenity=restaurant') {
return 'restaurant';
}
if ($this->main_tag == 'amenity=bar') {
return 'bar';
}
if ($this->main_tag == 'amenity=cafe') {
return 'café';
}
if ($this->main_tag == 'amenity=hotel') {
return 'hôtel';
}
if ($this->main_tag == 'amenity=supermarket') {
return 'supermarché';
}
if ($this->main_tag == 'amenity=pharmacy') {
return 'pharmacie';
}
if ($this->main_tag == 'amenity=bank') {
return 'banque';
}
if ($this->main_tag == 'amenity=post_office') {
return 'poste';
}
if ($this->main_tag == 'amenity=school') {
return 'école';
}
return 'lieu';
}
public function getMainTag(): ?string
{
return $this->main_tag;
@ -594,4 +631,16 @@ class Place
return $this;
}
public function getOsmDataDate(): ?\DateTime
{
return $this->osm_data_date;
}
public function setOsmDataDate(?\DateTime $osm_data_date): static
{
$this->osm_data_date = $osm_data_date;
return $this;
}
}