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

@@ -17,46 +17,33 @@ use Chill\MainBundle\Entity\User;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
*
* @ORM\Table("chill_person_accompanying_period_user_history")
*/
#[ORM\Entity]
#[ORM\Table('chill_person_accompanying_period_user_history')]
class UserHistory implements TrackCreationInterface
{
use TrackCreationTrait;
/**
* @ORM\Column(type="datetime_immutable", nullable=true, options={"default": null})
*/
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true, options: ['default' => null])]
private ?\DateTimeImmutable $endDate = null;
/**
* @ORM\Id
*
* @ORM\Column(name="id", type="integer")
*
* @ORM\GeneratedValue(strategy="AUTO")
*/
#[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private ?int $id = null;
public function __construct(
/**
* @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class, inversedBy="userHistories")
*
* @ORM\JoinColumn(nullable=false)
*/
#[ORM\ManyToOne(targetEntity: AccompanyingPeriod::class, inversedBy: 'userHistories')]
#[ORM\JoinColumn(nullable: false)]
private ?AccompanyingPeriod $accompanyingPeriod,
/**
* @ORM\ManyToOne(targetEntity=User::class)
*
* @ORM\JoinColumn(nullable=false)
*/
#[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)]
private User $user,
/**
* @ORM\Column(type="datetime_immutable", nullable=false, options={"default": "now()"})
*/
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: false, options: ['default' => 'now()'])]
private \DateTimeImmutable $startDate = new \DateTimeImmutable('now')
) {}