mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +00:00
addresses: add groups annotation to Country, postal code & address reference
This commit is contained in:
parent
f7dea7f041
commit
e88e9b1a6f
@ -4,6 +4,7 @@ namespace Chill\MainBundle\Entity;
|
|||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Chill\MainBundle\Doctrine\Model\Point;
|
use Chill\MainBundle\Doctrine\Model\Point;
|
||||||
|
use Symfony\Component\Serializer\Annotation\Groups;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity()
|
* @ORM\Entity()
|
||||||
@ -16,21 +17,25 @@ class AddressReference
|
|||||||
* @ORM\Id
|
* @ORM\Id
|
||||||
* @ORM\GeneratedValue
|
* @ORM\GeneratedValue
|
||||||
* @ORM\Column(type="integer")
|
* @ORM\Column(type="integer")
|
||||||
|
* @groups({"read"})
|
||||||
*/
|
*/
|
||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string", length=255)
|
* @ORM\Column(type="string", length=255)
|
||||||
|
* @groups({"read"})
|
||||||
*/
|
*/
|
||||||
private $refId;
|
private $refId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string", length=255, nullable=true)
|
* @ORM\Column(type="string", length=255, nullable=true)
|
||||||
|
* @groups({"read"})
|
||||||
*/
|
*/
|
||||||
private $street;
|
private $street;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string", length=255, nullable=true)
|
* @ORM\Column(type="string", length=255, nullable=true)
|
||||||
|
* @groups({"read"})
|
||||||
*/
|
*/
|
||||||
private $streetNumber;
|
private $streetNumber;
|
||||||
|
|
||||||
@ -38,16 +43,19 @@ class AddressReference
|
|||||||
* @var PostalCode
|
* @var PostalCode
|
||||||
*
|
*
|
||||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\PostalCode")
|
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\PostalCode")
|
||||||
|
* @groups({"read"})
|
||||||
*/
|
*/
|
||||||
private $postcode;
|
private $postcode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string", length=255, nullable=true)
|
* @ORM\Column(type="string", length=255, nullable=true)
|
||||||
|
* @groups({"read"})
|
||||||
*/
|
*/
|
||||||
private $municipalityCode;
|
private $municipalityCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Column(type="string", length=255, nullable=true)
|
* @ORM\Column(type="string", length=255, nullable=true)
|
||||||
|
* @groups({"read"})
|
||||||
*/
|
*/
|
||||||
private $source;
|
private $source;
|
||||||
|
|
||||||
@ -57,6 +65,7 @@ class AddressReference
|
|||||||
* @var Point
|
* @var Point
|
||||||
*
|
*
|
||||||
* @ORM\Column(type="point")
|
* @ORM\Column(type="point")
|
||||||
|
* @groups({"read"})
|
||||||
*/
|
*/
|
||||||
private $point;
|
private $point;
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace Chill\MainBundle\Entity;
|
namespace Chill\MainBundle\Entity;
|
||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use Symfony\Component\Serializer\Annotation\Groups;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Country
|
* Country
|
||||||
@ -20,6 +21,7 @@ class Country
|
|||||||
* @ORM\Id
|
* @ORM\Id
|
||||||
* @ORM\Column(name="id", type="integer")
|
* @ORM\Column(name="id", type="integer")
|
||||||
* @ORM\GeneratedValue(strategy="AUTO")
|
* @ORM\GeneratedValue(strategy="AUTO")
|
||||||
|
* @groups({"read"})
|
||||||
*/
|
*/
|
||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
@ -27,6 +29,8 @@ class Country
|
|||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(type="json_array")
|
* @ORM\Column(type="json_array")
|
||||||
|
* @groups({"read"})
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
private $name;
|
private $name;
|
||||||
|
|
||||||
@ -34,6 +38,7 @@ class Country
|
|||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(type="string", length=3)
|
* @ORM\Column(type="string", length=3)
|
||||||
|
* @groups({"read"})
|
||||||
*/
|
*/
|
||||||
private $countryCode;
|
private $countryCode;
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace Chill\MainBundle\Entity;
|
namespace Chill\MainBundle\Entity;
|
||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use Symfony\Component\Serializer\Annotation\Groups;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PostalCode
|
* PostalCode
|
||||||
@ -25,6 +26,7 @@ class PostalCode
|
|||||||
* @ORM\Id
|
* @ORM\Id
|
||||||
* @ORM\Column(name="id", type="integer")
|
* @ORM\Column(name="id", type="integer")
|
||||||
* @ORM\GeneratedValue(strategy="AUTO")
|
* @ORM\GeneratedValue(strategy="AUTO")
|
||||||
|
* @groups({"read"})
|
||||||
*/
|
*/
|
||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
@ -32,6 +34,7 @@ class PostalCode
|
|||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(type="string", length=255, name="label")
|
* @ORM\Column(type="string", length=255, name="label")
|
||||||
|
* @groups({"read"})
|
||||||
*/
|
*/
|
||||||
private $name;
|
private $name;
|
||||||
|
|
||||||
@ -39,6 +42,7 @@ class PostalCode
|
|||||||
* @var string
|
* @var string
|
||||||
*
|
*
|
||||||
* @ORM\Column(type="string", length=100)
|
* @ORM\Column(type="string", length=100)
|
||||||
|
* @groups({"read"})
|
||||||
*/
|
*/
|
||||||
private $code;
|
private $code;
|
||||||
|
|
||||||
@ -46,6 +50,7 @@ class PostalCode
|
|||||||
* @var Country
|
* @var Country
|
||||||
*
|
*
|
||||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Country")
|
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Country")
|
||||||
|
* @groups({"read"})
|
||||||
*/
|
*/
|
||||||
private $country;
|
private $country;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user