mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
addresses: add groups annotation to Country, postal code & address reference
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace Chill\MainBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
|
||||
/**
|
||||
* Country
|
||||
@@ -20,6 +21,7 @@ class Country
|
||||
* @ORM\Id
|
||||
* @ORM\Column(name="id", type="integer")
|
||||
* @ORM\GeneratedValue(strategy="AUTO")
|
||||
* @groups({"read"})
|
||||
*/
|
||||
private $id;
|
||||
|
||||
@@ -27,13 +29,16 @@ class Country
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(type="json_array")
|
||||
* @groups({"read"})
|
||||
*
|
||||
*/
|
||||
private $name;
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(type="string", length=3)
|
||||
* @groups({"read"})
|
||||
*/
|
||||
private $countryCode;
|
||||
|
||||
@@ -41,7 +46,7 @@ class Country
|
||||
/**
|
||||
* Get id
|
||||
*
|
||||
* @return integer
|
||||
* @return integer
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
@@ -57,20 +62,20 @@ class Country
|
||||
public function setName($name)
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
*
|
||||
* @return string
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
@@ -90,12 +95,12 @@ class Country
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $countryCode
|
||||
* @param string $countryCode
|
||||
*/
|
||||
public function setCountryCode($countryCode)
|
||||
{
|
||||
$this->countryCode = $countryCode;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user