Apply rector rules: add annotation for doctrine mapping

This commit is contained in:
2024-04-05 00:01:30 +02:00
parent 579bd829f8
commit 72016e1a21
124 changed files with 1724 additions and 3770 deletions

View File

@@ -19,38 +19,31 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
*
* @ORM\Table("chill_person_accompanying_period_work_evaluation_document")
*/
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_work_evaluation_document' => AccompanyingPeriodWorkEvaluationDocument::class])]
#[ORM\Entity]
#[ORM\Table('chill_person_accompanying_period_work_evaluation_document')]
class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doctrine\Model\TrackCreationInterface, \Chill\MainBundle\Doctrine\Model\TrackUpdateInterface
{
use TrackCreationTrait;
use TrackUpdateTrait;
/**
* @ORM\ManyToOne(
* targetEntity=AccompanyingPeriodWorkEvaluation::class,
* inversedBy="documents"
* )
*/
#[ORM\ManyToOne(targetEntity: AccompanyingPeriodWorkEvaluation::class, inversedBy: 'documents')]
private ?AccompanyingPeriodWorkEvaluation $accompanyingPeriodWorkEvaluation = null;
/**
* @ORM\Id
*
* @ORM\GeneratedValue
*
* @ORM\Column(type="integer")
*
* @internal the default name exceeds 64 characters, we must set manually:
*
* @ORM\SequenceGenerator(sequenceName="chill_person_social_work_eval_doc_id_seq", allocationSize=1, initialValue=1000)
*/
#[Serializer\Groups(['read', 'accompanying_period_work_evaluation:create'])]
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\SequenceGenerator(sequenceName: 'chill_person_social_work_eval_doc_id_seq', allocationSize: 1, initialValue: 1000)]
private ?int $id = null;
/**
@@ -63,27 +56,17 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct
#[Serializer\Groups(['read', 'write', 'accompanying_period_work_evaluation:create'])]
private $key;
/**
* @ORM\ManyToOne(
* targetEntity=StoredObject::class,
* )
*/
#[Serializer\Groups(['read', 'write', 'accompanying_period_work_evaluation:create'])]
#[Assert\Valid]
#[ORM\ManyToOne(targetEntity: StoredObject::class)]
private ?StoredObject $storedObject = null;
/**
* @ORM\ManyToOne(
* targetEntity=DocGeneratorTemplate::class
* )
*/
#[Serializer\Groups(['read', 'accompanying_period_work_evaluation:create'])]
#[ORM\ManyToOne(targetEntity: DocGeneratorTemplate::class)]
private ?DocGeneratorTemplate $template = null;
/**
* @ORM\Column(type="text", nullable=false, options={"default": ""})
*/
#[Serializer\Groups(['read', 'write', 'accompanying_period_work_evaluation:create'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false, options: ['default' => ''])]
private ?string $title = '';
public function getAccompanyingPeriodWorkEvaluation(): ?AccompanyingPeriodWorkEvaluation