mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
165 lines
2.9 KiB
PHP
165 lines
2.9 KiB
PHP
<?php
|
|
|
|
namespace Chill\MainBundle\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Chill\MainBundle\Doctrine\Model\Point;
|
|
|
|
/**
|
|
* @ORM\Entity()
|
|
* @ORM\Table(name="chill_main_address_reference")
|
|
* @ORM\HasLifecycleCallbacks()
|
|
*/
|
|
class AddressReference
|
|
{
|
|
/**
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue
|
|
* @ORM\Column(type="integer")
|
|
*/
|
|
private $id;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=255)
|
|
*/
|
|
private $refId;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=255, nullable=true)
|
|
*/
|
|
private $street;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=255, nullable=true)
|
|
*/
|
|
private $streetNumber;
|
|
|
|
/**
|
|
* @var PostalCode
|
|
*
|
|
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\PostalCode")
|
|
*/
|
|
private $postcode;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=255, nullable=true)
|
|
*/
|
|
private $municipalityCode;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=255, nullable=true)
|
|
*/
|
|
private $source;
|
|
|
|
/**
|
|
* A geospatial field storing the coordinates of the Address
|
|
*
|
|
* @var Point
|
|
*
|
|
* @ORM\Column(type="point")
|
|
*/
|
|
private $point;
|
|
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getRefId(): ?string
|
|
{
|
|
return $this->refId;
|
|
}
|
|
|
|
public function setRefId(string $refId): self
|
|
{
|
|
$this->refId = $refId;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getStreet(): ?string
|
|
{
|
|
return $this->street;
|
|
}
|
|
|
|
public function setStreet(?string $street): self
|
|
{
|
|
$this->street = $street;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getStreetNumber(): ?string
|
|
{
|
|
return $this->streetNumber;
|
|
}
|
|
|
|
public function setStreetNumber(?string $streetNumber): self
|
|
{
|
|
$this->streetNumber = $streetNumber;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Set postcode
|
|
*
|
|
* @param PostalCode $postcode
|
|
*
|
|
* @return Address
|
|
*/
|
|
public function setPostcode(PostalCode $postcode = null)
|
|
{
|
|
$this->postcode = $postcode;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get postcode
|
|
*
|
|
* @return PostalCode
|
|
*/
|
|
public function getPostcode()
|
|
{
|
|
return $this->postcode;
|
|
}
|
|
|
|
public function getMunicipalityCode(): ?string
|
|
{
|
|
return $this->municipalityCode;
|
|
}
|
|
|
|
public function setMunicipalityCode(?string $municipalityCode): self
|
|
{
|
|
$this->municipalityCode = $municipalityCode;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getSource(): ?string
|
|
{
|
|
return $this->source;
|
|
}
|
|
|
|
public function setSource(?string $source): self
|
|
{
|
|
$this->source = $source;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getPoint(): ?Point
|
|
{
|
|
return $this->point;
|
|
}
|
|
|
|
public function setPoint(?Point $point): self
|
|
{
|
|
$this->point = $point;
|
|
|
|
return $this;
|
|
}
|
|
}
|