mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 23:04:58 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -19,63 +19,51 @@ 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_result")
|
||||
*/
|
||||
|
||||
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['social_work_result' => Result::class])]
|
||||
#[ORM\Entity]
|
||||
#[ORM\Table(name: 'chill_person_social_work_result')]
|
||||
class Result
|
||||
{
|
||||
/**
|
||||
* @var Collection<AccompanyingPeriodWorkGoal>
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity=AccompanyingPeriodWorkGoal::class, mappedBy="results")
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: AccompanyingPeriodWorkGoal::class, mappedBy: 'results')]
|
||||
private Collection $accompanyingPeriodWorkGoals;
|
||||
|
||||
/**
|
||||
* @var Collection<AccompanyingPeriodWork>
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity=AccompanyingPeriodWork::class, mappedBy="results")
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: AccompanyingPeriodWork::class, mappedBy: 'results')]
|
||||
private Collection $accompanyingPeriodWorks;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE, nullable: true)]
|
||||
private ?\DateTime $desactivationDate = null;
|
||||
|
||||
/**
|
||||
* @var Collection<Goal>
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity=Goal::class, mappedBy="results")
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: Goal::class, mappedBy: 'results')]
|
||||
private Collection $goals;
|
||||
|
||||
/**
|
||||
* @ORM\Id
|
||||
*
|
||||
* @ORM\GeneratedValue
|
||||
*
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
private ?int $id = null;
|
||||
|
||||
/**
|
||||
* @var Collection<SocialAction>
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity=SocialAction::class, mappedBy="results")
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: SocialAction::class, mappedBy: 'results')]
|
||||
private Collection $socialActions;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
*
|
||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
||||
*/
|
||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||
private array $title = [];
|
||||
|
||||
public function __construct()
|
||||
|
Reference in New Issue
Block a user