addresses: add groups annotation to Country, postal code & address reference

This commit is contained in:
nobohan
2021-05-25 14:38:09 +02:00
parent f7dea7f041
commit e88e9b1a6f
3 changed files with 26 additions and 7 deletions

View File

@@ -4,6 +4,7 @@ namespace Chill\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Chill\MainBundle\Doctrine\Model\Point;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity()
@@ -16,21 +17,25 @@ class AddressReference
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @groups({"read"})
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
* @groups({"read"})
*/
private $refId;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @groups({"read"})
*/
private $street;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @groups({"read"})
*/
private $streetNumber;
@@ -38,16 +43,19 @@ class AddressReference
* @var PostalCode
*
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\PostalCode")
* @groups({"read"})
*/
private $postcode;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @groups({"read"})
*/
private $municipalityCode;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @groups({"read"})
*/
private $source;
@@ -57,6 +65,7 @@ class AddressReference
* @var Point
*
* @ORM\Column(type="point")
* @groups({"read"})
*/
private $point;