mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
add many2many relation between socialIssue and accompanying period + api endpoint
This commit is contained in:
@@ -6,10 +6,15 @@ use Chill\PersonBundle\Repository\SocialWork\SocialIssueRepository;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Serializer\Annotation\Groups;
|
||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
||||
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass=SocialIssueRepository::class)
|
||||
* @ORM\Table(name="chill_person_social_issue")
|
||||
* @DiscriminatorMap(typeProperty="type", mapping={
|
||||
* "social_issue"=SocialIssue::class
|
||||
* })
|
||||
*/
|
||||
class SocialIssue
|
||||
{
|
||||
@@ -37,6 +42,7 @@ class SocialIssue
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
* @Groups({"read"})
|
||||
*/
|
||||
private $title = [];
|
||||
|
||||
@@ -61,6 +67,11 @@ class SocialIssue
|
||||
return $this->parent;
|
||||
}
|
||||
|
||||
public function hasParent(): bool
|
||||
{
|
||||
return $this->parent !== null;
|
||||
}
|
||||
|
||||
public function setParent(?self $parent): self
|
||||
{
|
||||
$this->parent = $parent;
|
||||
|
Reference in New Issue
Block a user