add address and postal code

This commit is contained in:
2016-03-10 17:57:30 +01:00
parent 6ae1b8334e
commit 7679786288
7 changed files with 476 additions and 0 deletions

141
Entity/Address.php Normal file
View File

@@ -0,0 +1,141 @@
<?php
namespace Chill\MainBundle\Entity;
/**
* Address
*/
class Address
{
/**
* @var integer
*/
private $id;
/**
* @var string
*/
private $streetAddress1;
/**
* @var string
*/
private $streetAddress2;
/**
* @var \Chill\MainBundle\Entity\PostalCode
*/
private $postcode;
/**
*
* @var \DateTime
*/
private $validFrom;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set streetAddress1
*
* @param string $streetAddress1
*
* @return Address
*/
public function setStreetAddress1($streetAddress1)
{
$this->streetAddress1 = $streetAddress1;
return $this;
}
/**
* Get streetAddress1
*
* @return string
*/
public function getStreetAddress1()
{
return $this->streetAddress1;
}
/**
* Set streetAddress2
*
* @param string $streetAddress2
*
* @return Address
*/
public function setStreetAddress2($streetAddress2)
{
$this->streetAddress2 = $streetAddress2;
return $this;
}
/**
* Get streetAddress2
*
* @return string
*/
public function getStreetAddress2()
{
return $this->streetAddress2;
}
/**
* Set postcode
*
* @param \Chill\MainBundle\Entity\PostalCode $postcode
*
* @return Address
*/
public function setPostcode(\Chill\MainBundle\Entity\PostalCode $postcode = null)
{
$this->postcode = $postcode;
return $this;
}
/**
* Get postcode
*
* @return \Chill\MainBundle\Entity\PostalCode
*/
public function getPostcode()
{
return $this->postcode;
}
/**
*
* @return \DateTime
*/
public function getValidFrom()
{
return $this->validFrom;
}
/**
*
* @param \DateTime $validFrom
* @return \Chill\MainBundle\Entity\Address
*/
public function setValidFrom(\DateTime $validFrom)
{
$this->validFrom = $validFrom;
return $this;
}
}

113
Entity/PostalCode.php Normal file
View File

@@ -0,0 +1,113 @@
<?php
namespace Chill\MainBundle\Entity;
/**
* PostalCode
*/
class PostalCode
{
/**
* @var integer
*/
private $id;
/**
* @var string
*/
private $name;
/**
* @var string
*/
private $code;
/**
* @var \Chill\MainBundle\Entity\Country
*/
private $country;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set name
*
* @param string $name
*
* @return PostalCode
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set code
*
* @param string $code
*
* @return PostalCode
*/
public function setCode($code)
{
$this->code = $code;
return $this;
}
/**
* Get code
*
* @return string
*/
public function getCode()
{
return $this->code;
}
/**
* Set country
*
* @param \Chill\MainBundle\Entity\Country $country
*
* @return PostalCode
*/
public function setCountry(\Chill\MainBundle\Entity\Country $country = null)
{
$this->country = $country;
return $this;
}
/**
* Get country
*
* @return \Chill\MainBundle\Entity\Country
*/
public function getCountry()
{
return $this->country;
}
}