post new address - WIP

This commit is contained in:
nobohan
2021-05-25 17:54:21 +02:00
parent e88e9b1a6f
commit 72795be040
4 changed files with 80 additions and 24 deletions

View File

@@ -4,6 +4,7 @@ namespace Chill\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use Symfony\Component\Serializer\Annotation\Groups;
use Chill\MainBundle\Doctrine\Model\Point;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
@@ -22,6 +23,7 @@ class Address
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
* @groups({"write"})
*/
private $id;
@@ -29,6 +31,7 @@ class Address
* @var string
*
* @ORM\Column(type="string", length=255)
* @groups({"write"})
*/
private $street = '';
@@ -36,6 +39,7 @@ class Address
* @var string
*
* @ORM\Column(type="string", length=255)
* @groups({"write"})
*/
private $streetNumber = '';
@@ -43,6 +47,7 @@ class Address
* @var PostalCode
*
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\PostalCode")
* @groups({"write"})
*/
private $postcode;
@@ -50,6 +55,7 @@ class Address
* @var string|null
*
* @ORM\Column(type="string", length=16, nullable=true)
* @groups({"write"})
*/
private $floor;
@@ -57,6 +63,7 @@ class Address
* @var string|null
*
* @ORM\Column(type="string", length=16, nullable=true)
* @groups({"write"})
*/
private $corridor;
@@ -64,6 +71,7 @@ class Address
* @var string|null
*
* @ORM\Column(type="string", length=16, nullable=true)
* @groups({"write"})
*/
private $steps;
@@ -71,6 +79,7 @@ class Address
* @var string|null
*
* @ORM\Column(type="string", length=255, nullable=true)
* @groups({"write"})
*/
private $buildingName;
@@ -78,6 +87,7 @@ class Address
* @var string|null
*
* @ORM\Column(type="string", length=16, nullable=true)
* @groups({"write"})
*/
private $flat;
@@ -85,6 +95,7 @@ class Address
* @var string|null
*
* @ORM\Column(type="string", length=255, nullable=true)
* @groups({"write"})
*/
private $distribution;
@@ -92,6 +103,7 @@ class Address
* @var string|null
*
* @ORM\Column(type="string", length=255, nullable=true)
* @groups({"write"})
*/
private $extra;
@@ -102,6 +114,7 @@ class Address
* @var \DateTime
*
* @ORM\Column(type="date")
* @groups({"write"})
*/
private $validFrom;
@@ -112,11 +125,13 @@ class Address
* @var \DateTime|null
*
* @ORM\Column(type="date", nullable=true)
* @groups({"write"})
*/
private $validTo;
/**
* True if the address is a "no address", aka homeless person, ...
* @groups({"write"})
*
* @var bool
*/
@@ -128,6 +143,7 @@ class Address
* @var Point|null
*
* @ORM\Column(type="point", nullable=true)
* @groups({"write"})
*/
private $point;
@@ -138,6 +154,7 @@ class Address
*
* @ORM\ManyToOne(targetEntity="Chill\ThirdPartyBundle\Entity\ThirdParty")
* @ORM\JoinColumn(nullable=true)
* @groups({"write"})
*/
private $linkedToThirdParty;