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

@@ -20,67 +20,48 @@ use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
*
* @ORM\Table(name="chill_person_accompanying_period_comment")
*/
#[DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_comment' => Comment::class])]
#[ORM\Entity]
#[ORM\Table(name: 'chill_person_accompanying_period_comment')]
class Comment implements TrackCreationInterface, TrackUpdateInterface
{
/**
* @ORM\ManyToOne(
* targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod",
* inversedBy="comments")
*
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
#[ORM\ManyToOne(targetEntity: \Chill\PersonBundle\Entity\AccompanyingPeriod::class, inversedBy: 'comments')]
#[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
private ?AccompanyingPeriod $accompanyingPeriod = null;
/**
* @ORM\Column(type="text", nullable=false, options={"default":""})
*/
#[Groups(['read', 'write', 'docgen:read'])]
#[Assert\NotBlank]
#[Assert\NotNull]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false, options: ['default' => ''])]
private string $content = '';
/**
* @ORM\Column(type="datetime")
*/
#[Groups(['read', 'docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $createdAt = null;
/**
* @ORM\ManyToOne(targetEntity=User::class)
*
* @ORM\JoinColumn(nullable=false)
*/
#[Groups(['read', 'docgen:read'])]
#[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)]
private ?User $creator = null;
/**
* @ORM\Id
*
* @ORM\GeneratedValue
*
* @ORM\Column(type="integer")
*/
#[Groups(['read', 'docgen:read'])]
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null;
/**
* @ORM\Column(type="datetime")
*/
#[Groups(['read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $updatedAt = null;
/**
* @ORM\ManyToOne(targetEntity=User::class)
*
* @ORM\JoinColumn(nullable=false)
*/
#[Groups(['read'])]
#[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)]
private ?User $updatedBy = null;
public function getAccompanyingPeriod(): ?AccompanyingPeriod