mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
finalize normalization on ressources
This commit is contained in:
@@ -39,13 +39,13 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
|
||||
|
||||
/**
|
||||
* @ORM\Embedded(class="Chill\MainBundle\Entity\Embeddable\CommentEmbeddable", columnPrefix="comment_")
|
||||
* @Groups({"read"})
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private CommentEmbeddable $comment;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
* @Groups({"read"})
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private ?string $freeText = null;
|
||||
|
||||
@@ -53,24 +53,29 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private ?int $id;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=PersonResourceKind::class, inversedBy="personResources")
|
||||
* @ORM\JoinColumn(nullable=true)
|
||||
* @Groups({"read"})
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private $kind;
|
||||
private ?PersonResourceKind $kind = null;
|
||||
|
||||
/**
|
||||
* The person which host the owner of this resource.
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity=Person::class, inversedBy="personResources")
|
||||
* @ORM\JoinColumn(nullable=true)
|
||||
* @Groups({"read"})
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private ?Person $person = null;
|
||||
|
||||
/**
|
||||
* The person linked with this resource.
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity=Person::class)
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
* @Groups({"read"})
|
||||
@@ -80,7 +85,7 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=ThirdParty::class, inversedBy="personResources")
|
||||
* @ORM\JoinColumn(nullable=true)
|
||||
* @Groups({"read"})
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
private ?ThirdParty $thirdParty = null;
|
||||
|
||||
@@ -117,8 +122,13 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
|
||||
return $this->person;
|
||||
}
|
||||
|
||||
public function getPersonOwner(): ?Person
|
||||
{
|
||||
return $this->personOwner;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Groups({"read"})
|
||||
* @Groups({"read", "docgen:read"})
|
||||
*/
|
||||
public function getResourceKind(): string
|
||||
{
|
||||
@@ -137,12 +147,6 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
|
||||
return 'none';
|
||||
}
|
||||
|
||||
|
||||
public function getPersonOwner(): ?Person
|
||||
{
|
||||
return $this->personOwner;
|
||||
}
|
||||
|
||||
public function getThirdParty(): ?ThirdParty
|
||||
{
|
||||
return $this->thirdParty;
|
||||
|
Reference in New Issue
Block a user