mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
add api for getting goal and results by social action and goal
This commit is contained in:
@@ -5,10 +5,17 @@ namespace Chill\PersonBundle\Entity\SocialWork;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="chill_person_social_work_goal")
|
||||
* @Serializer\DiscriminatorMap(
|
||||
* typeProperty="type",
|
||||
* mapping={
|
||||
* "social_work_goal":Goal::class
|
||||
* }
|
||||
* )
|
||||
*/
|
||||
class Goal
|
||||
{
|
||||
@@ -16,11 +23,13 @@ class Goal
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
private $title = [];
|
||||
|
||||
@@ -46,6 +55,11 @@ class Goal
|
||||
$this->results = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getTitle(): array
|
||||
{
|
||||
return $this->title;
|
||||
|
Reference in New Issue
Block a user