mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 21:13:57 +00:00
sf4 deprecated: migrate Doctrine ORM mapping to annotation
This commit is contained in:
@@ -2,28 +2,50 @@
|
||||
|
||||
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 \Chill\MainBundle\Entity\Country
|
||||
* @var Country
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Country")
|
||||
*/
|
||||
private $country;
|
||||
|
||||
@@ -89,11 +111,11 @@ class PostalCode
|
||||
/**
|
||||
* Set country
|
||||
*
|
||||
* @param \Chill\MainBundle\Entity\Country $country
|
||||
* @param Country $country
|
||||
*
|
||||
* @return PostalCode
|
||||
*/
|
||||
public function setCountry(\Chill\MainBundle\Entity\Country $country = null)
|
||||
public function setCountry(Country $country = null)
|
||||
{
|
||||
$this->country = $country;
|
||||
|
||||
@@ -103,7 +125,7 @@ class PostalCode
|
||||
/**
|
||||
* Get country
|
||||
*
|
||||
* @return \Chill\MainBundle\Entity\Country
|
||||
* @return Country
|
||||
*/
|
||||
public function getCountry()
|
||||
{
|
||||
|
Reference in New Issue
Block a user