mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 04:53:49 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -18,12 +18,10 @@ use Chill\MainBundle\Entity\Location;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
|
||||
#[ORM\Entity]
|
||||
#[ORM\Table(schema: 'chill_asideactivity')]
|
||||
class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
|
||||
{
|
||||
|
||||
#[Assert\NotBlank]
|
||||
#[ORM\ManyToOne(targetEntity: User::class)]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
@@ -32,7 +30,6 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE)]
|
||||
private ?\DateTimeInterface $createdAt = null;
|
||||
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: User::class)]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private User $createdBy;
|
||||
@@ -43,13 +40,11 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TIME_MUTABLE, nullable: true)]
|
||||
private ?\DateTimeInterface $duration = null;
|
||||
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
private ?int $id = null;
|
||||
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: Location::class)]
|
||||
#[ORM\JoinColumn(nullable: true)]
|
||||
private ?Location $location = null;
|
||||
@@ -57,7 +52,6 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
|
||||
private ?string $note = null;
|
||||
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: AsideActivityCategory::class, inversedBy: 'asideActivities')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?AsideActivityCategory $type = null;
|
||||
|
@@ -17,7 +17,6 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
|
||||
|
||||
#[ORM\Entity]
|
||||
#[ORM\Table(schema: 'chill_asideactivity')]
|
||||
class AsideActivityCategory
|
||||
@@ -28,7 +27,6 @@ class AsideActivityCategory
|
||||
#[ORM\OneToMany(targetEntity: AsideActivityCategory::class, mappedBy: 'parent')]
|
||||
private Collection $children;
|
||||
|
||||
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||
@@ -42,7 +40,6 @@ class AsideActivityCategory
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT, options: ['default' => '0.00'])]
|
||||
private float $ordering = 0.00;
|
||||
|
||||
|
||||
#[ORM\ManyToOne(targetEntity: AsideActivityCategory::class, inversedBy: 'children')]
|
||||
#[ORM\JoinColumn(nullable: true)]
|
||||
private ?AsideActivityCategory $parent = null;
|
||||
|
Reference in New Issue
Block a user