mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
creation api endpoint. Route found, but ajax call still needs to be tested
This commit is contained in:
@@ -30,6 +30,7 @@ use Chill\MainBundle\Entity\Center;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
use Chill\MainBundle\Entity\Address;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
|
||||
/**
|
||||
* ThirdParty is a party recorded in the database.
|
||||
@@ -59,6 +60,7 @@ class ThirdParty
|
||||
* @var string
|
||||
* @ORM\Column(name="name", type="string", length=255)
|
||||
* @Assert\Length(min="2")
|
||||
* @Groups({"read", "write"})
|
||||
*/
|
||||
private $name;
|
||||
|
||||
@@ -128,6 +130,7 @@ class ThirdParty
|
||||
* @Assert\Regex("/^([\+{1}])([0-9\s*]{4,20})$/",
|
||||
* message="Invalid phone number: it should begin with the international prefix starting with ""+"", hold only digits and be smaller than 20 characters. Ex: +33123456789"
|
||||
* )
|
||||
* @Groups({"read", "write"})
|
||||
*/
|
||||
private $telephone;
|
||||
|
||||
@@ -135,6 +138,7 @@ class ThirdParty
|
||||
* @var string|null
|
||||
* @ORM\Column(name="email", type="string", length=255, nullable=true)
|
||||
* @Assert\Email(checkMX=false)
|
||||
* @Groups({"read", "write"})
|
||||
*/
|
||||
private $email;
|
||||
|
||||
@@ -143,6 +147,7 @@ class ThirdParty
|
||||
* @ORM\ManyToOne(targetEntity="\Chill\MainBundle\Entity\Address",
|
||||
* cascade={"persist", "remove"})
|
||||
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
|
||||
* @Groups({"read", "write"})
|
||||
*/
|
||||
private $address;
|
||||
|
||||
|
Reference in New Issue
Block a user