mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 06:14:59 +00:00
fix folder name
This commit is contained in:
135
src/Bundle/ChillMainBundle/Entity/PostalCode.php
Normal file
135
src/Bundle/ChillMainBundle/Entity/PostalCode.php
Normal file
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\MainBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
/**
|
||||
* PostalCode
|
||||
*
|
||||
* @ORM\Entity(repositoryClass="Chill\MainBundle\Repository\PostalCodeRepository")
|
||||
* @ORM\Table(
|
||||
* name="chill_main_postal_code",
|
||||
* indexes={@ORM\Index(
|
||||
* name="search_name_code",
|
||||
* columns={"code", "label"}
|
||||
* )})
|
||||
* @ORM\HasLifecycleCallbacks()
|
||||
*
|
||||
*/
|
||||
class PostalCode
|
||||
{
|
||||
/**
|
||||
* @var integer
|
||||
*
|
||||
* @ORM\Id
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(type="string", length=255, name="label")
|
||||
*/
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(type="string", length=100)
|
||||
*/
|
||||
private $code;
|
||||
|
||||
/**
|
||||
* @var Country
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="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 Country $country
|
||||
*
|
||||
* @return PostalCode
|
||||
*/
|
||||
public function setCountry(Country $country = null)
|
||||
{
|
||||
$this->country = $country;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get country
|
||||
*
|
||||
* @return Country
|
||||
*/
|
||||
public function getCountry()
|
||||
{
|
||||
return $this->country;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user