mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-10 07:19:42 +00:00
activity: avoid adding persons|Users|Thirdparty if not allowed
This commit is contained in:
@@ -22,6 +22,7 @@ use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
use Symfony\Component\Serializer\Annotation\SerializedName;
|
||||
|
||||
/**
|
||||
* Class Activity
|
||||
@@ -30,7 +31,7 @@ use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
* @ORM\Entity(repositoryClass="Chill\ActivityBundle\Repository\ActivityRepository")
|
||||
* @ORM\Table(name="activity")
|
||||
* @ORM\HasLifecycleCallbacks()
|
||||
* @DiscriminatorMap(typeProperty="type", mapping={
|
||||
* @DiscriminatorMap(typeProperty="_type", mapping={
|
||||
* "activity"=Activity::class
|
||||
* })
|
||||
*/
|
||||
@@ -102,6 +103,8 @@ class Activity implements HasCenterInterface, HasScopeInterface, AccompanyingPer
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Chill\ActivityBundle\Entity\ActivityType")
|
||||
* @Groups({"read"})
|
||||
* @SerializedName("activityType")
|
||||
*/
|
||||
private ActivityType $type;
|
||||
|
||||
|
Reference in New Issue
Block a user