mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 11:33:49 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -18,49 +18,38 @@ 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_accompanying_period_work_goal")
|
||||
*/
|
||||
|
||||
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_work_goal' => AccompanyingPeriodWorkGoal::class])]
|
||||
#[ORM\Entity]
|
||||
#[ORM\Table(name: 'chill_person_accompanying_period_work_goal')]
|
||||
class AccompanyingPeriodWorkGoal
|
||||
{
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=AccompanyingPeriodWork::class, inversedBy="goals")
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: AccompanyingPeriodWork::class, inversedBy: 'goals')]
|
||||
private ?AccompanyingPeriodWork $accompanyingPeriodWork = null;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=Goal::class)
|
||||
*/
|
||||
#[Serializer\Groups(['accompanying_period_work:edit', 'read', 'docgen:read'])]
|
||||
#[ORM\ManyToOne(targetEntity: Goal::class)]
|
||||
private ?Goal $goal = null;
|
||||
|
||||
/**
|
||||
* @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;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text")
|
||||
*/
|
||||
#[Serializer\Groups(['accompanying_period_work:edit', 'read'])]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT)]
|
||||
private string $note = '';
|
||||
|
||||
/**
|
||||
* @var Collection<Result>
|
||||
*
|
||||
* @ORM\ManyToMany(targetEntity=Result::class, inversedBy="accompanyingPeriodWorkGoals")
|
||||
*
|
||||
* @ORM\JoinTable(name="chill_person_accompanying_period_work_goal_result")
|
||||
*/
|
||||
#[Serializer\Groups(['accompanying_period_work:edit', 'read', 'docgen:read'])]
|
||||
#[ORM\ManyToMany(targetEntity: Result::class, inversedBy: 'accompanyingPeriodWorkGoals')]
|
||||
#[ORM\JoinTable(name: 'chill_person_accompanying_period_work_goal_result')]
|
||||
private Collection $results;
|
||||
|
||||
public function __construct()
|
||||
|
Reference in New Issue
Block a user