mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-25 16:14:59 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -20,7 +20,6 @@ use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
|
||||
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
|
||||
#[ORM\Entity]
|
||||
#[ORM\Table(name: 'chill_calendar.calendar_doc')]
|
||||
class CalendarDoc implements TrackCreationInterface, TrackUpdateInterface
|
||||
@@ -29,7 +28,6 @@ class CalendarDoc implements TrackCreationInterface, TrackUpdateInterface
|
||||
|
||||
use TrackUpdateTrait;
|
||||
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: Calendar::class, inversedBy: 'documents')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private Calendar $calendar;
|
||||
@@ -37,7 +35,6 @@ class CalendarDoc implements TrackCreationInterface, TrackUpdateInterface
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: false, options: ['default' => 0])]
|
||||
private int $datetimeVersion = 0;
|
||||
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
@@ -46,11 +43,12 @@ class CalendarDoc implements TrackCreationInterface, TrackUpdateInterface
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: false, options: ['default' => false])]
|
||||
private bool $trackDateTimeVersion = false;
|
||||
|
||||
public function __construct(Calendar $calendar,
|
||||
public function __construct(
|
||||
Calendar $calendar,
|
||||
#[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?StoredObject $storedObject)
|
||||
{
|
||||
private ?StoredObject $storedObject
|
||||
) {
|
||||
$this->setCalendar($calendar);
|
||||
$this->datetimeVersion = $calendar->getDateTimeVersion();
|
||||
}
|
||||
|
Reference in New Issue
Block a user