<?php
namespace App\Entity;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Serializable;
use Doctrine\Common\Collections\Collection;
use Symfony\Component\Serializer\Annotation\Groups;
#[ORM\Entity(repositoryClass:'App\Repository\TownRepository')]
#[ORM\Table(name: 'town')]
class Town extends User
{
#[Groups(['town'])]
#[ORM\Column(name: 'id', type: 'integer', unique: true)]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
protected $id;
#[Groups(['town'])]
#[ORM\Column(name: 'name', type: 'string',length: 255, unique: true)]
protected $name;
#[Groups(['town'])]
#[ORM\Column(name: 'description', type: 'text')]
protected $description;
#[Groups(['town'])]
#[ORM\Column(name: 'street', type: 'string', length: 255)]
protected $street;
#[Groups(['town'])]
#[ORM\Column(name: 'streetnumber', type: 'string', nullable: true)]
protected $streetnumber;
#[Groups(['town'])]
#[ORM\Column(name: 'postcode', type: 'string')]
protected $postcode;
#[Groups(['town'])]
#[ORM\Column(name: 'city', type: 'string', length: 255)]
protected $city;
#[Groups(['town'])]
#[ORM\Column(name: 'region', type: 'string', length: 255)]
protected $region;
#[Groups(['town'])]
#[ORM\Column(name: 'country', type: 'string', length: 255)]
protected $country;
#[Groups(['town'])]
#[ORM\Column(name: 'phone', type: 'string', length: 255)]
protected $phone;
#[Groups(['town'])]
#[ORM\Column(name: 'vision', type: 'text')]
protected $vision;
#[Groups(['town'])]
#[ORM\Column(name: 'urlwebsite', type: 'string', length: 255, nullable: true)]
protected $urlwebsite;
#[Groups(['town'])]
#[ORM\Column(name: 'slug', type: 'string', length: 255)]
protected $slug;
/**
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @param int $id
*/
public function setId($id)
{
$this->id = $id;
}
/**
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}
/**
* @return text
*/
public function getDescription()
{
return $this->description;
}
/**
* @param text $description
*/
public function setDescription($description)
{
$this->description = $description;
}
/**
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* @param string $slug
*/
public function setSlug($slug)
{
$this->slug = $slug;
}
/**
* @return string
*/
public function getUrlwebsite()
{
return $this->urlwebsite;
}
/**
* @param string $urlwebsite
*/
public function setUrlwebsite($urlwebsite)
{
$this->urlwebsite = $urlwebsite;
}
/**
* @return text
*/
public function getVision()
{
return $this->vision;
}
/**
* @param text $vision
*/
public function setVision($vision)
{
$this->vision = $vision;
}
/**
* @return string
*/
public function getStreet(): string
{
return $this->street;
}
/**
* @param string $street
*/
public function setStreet(string $street): void
{
$this->street = $street;
}
/**
* @return string
*/
public function getStreetnumber(): string
{
return $this->streetnumber;
}
/**
* @param string $streetnumber
*/
public function setStreetnumber(string $streetnumber): void
{
$this->streetnumber = $streetnumber;
}
/**
* @return smallint
*/
public function getPostcode()
{
return $this->postcode;
}
/**
* @param smallint $postcode
*/
public function setPostcode($postcode)
{
$this->postcode = $postcode;
}
/**
* @return string
*/
public function getCity(): string
{
return $this->city;
}
/**
* @param string $city
*/
public function setCity(string $city): void
{
$this->city = $city;
}
/**
* @return string
*/
public function getRegion()
{
return $this->region;
}
/**
* @param string $region
*/
public function setRegion($region)
{
$this->region = $region;
}
/**
* @return string
*/
public function getCountry()
{
return $this->country;
}
/**
* @param string $country
*/
public function setCountry($country)
{
$this->country = $country;
}
/**
* @return string
*/
public function getPhone()
{
return $this->phone;
}
/**
* @param string $phone
*/
public function setPhone($phone)
{
$this->phone = $phone;
}
/**
* @return bool
*/
public function isActived()
{
return $this->actived;
}
/**
* @param bool $actived
*/
public function setActived($actived)
{
$this->actived = $actived;
}
#[ORM\Column(type: 'float')]
private $latitude;
#[ORM\Column(type: 'float')]
private $longtitude;
#[ORM\ManyToMany(targetEntity: 'TownFav', mappedBy: 'town')]
#[ORM\Column(type: 'boolean')]
private $activated = false;
public function getLatitude(): ?float
{
return $this->latitude;
}
public function setLatitude(float $latitude): self
{
$this->latitude = $latitude;
return $this;
}
public function getLongtitude(): ?float
{
return $this->longtitude;
}
public function setLongtitude(float $longtitude): self
{
$this->longtitude = $longtitude;
return $this;
}
public function getActivated(): ?bool
{
return $this->activated;
}
public function setActivated(bool $activated): self
{
$this->activated = $activated;
return $this;
}
}