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,102 +20,75 @@ use libphonenumber\PhoneNumber;
use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
/**
* @ORM\Table(name="chill_main_location")
*
* @ORM\Entity(repositoryClass=LocationRepository::class)
*/
#[DiscriminatorMap(typeProperty: 'type', mapping: ['location' => Location::class])]
#[ORM\Entity(repositoryClass: LocationRepository::class)]
#[ORM\Table(name: 'chill_main_location')]
class Location implements TrackCreationInterface, TrackUpdateInterface
{
/**
* @ORM\Column(type="boolean", nullable=true)
*/
#[Serializer\Groups(['read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: true)]
private bool $active = true;
/**
* @ORM\ManyToOne(targetEntity=Address::class, cascade={"persist"})
*
* @ORM\JoinColumn(nullable=true)
*/
#[Serializer\Groups(['read', 'write', 'docgen:read'])]
#[ORM\ManyToOne(targetEntity: Address::class, cascade: ['persist'])]
#[ORM\JoinColumn(nullable: true)]
private ?Address $address = null;
/**
* @ORM\Column(type="boolean")
*/
#[Serializer\Groups(['read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
private bool $availableForUsers = false;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
#[Serializer\Groups(['read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $createdAt = null;
/**
* @ORM\ManyToOne(targetEntity=User::class)
*/
#[Serializer\Groups(['read'])]
#[ORM\ManyToOne(targetEntity: User::class)]
private ?User $createdBy = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
#[Serializer\Groups(['read', 'write', 'docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255, nullable: true)]
private ?string $email = null;
/**
* @ORM\Id
*
* @ORM\GeneratedValue
*
* @ORM\Column(type="integer")
*/
#[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null;
/**
* @ORM\ManyToOne(targetEntity=LocationType::class)
*
* @ORM\JoinColumn(nullable=false)
*/
#[Serializer\Groups(['read', 'write', 'docgen:read'])]
#[ORM\ManyToOne(targetEntity: LocationType::class)]
#[ORM\JoinColumn(nullable: false)]
private ?LocationType $locationType = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
#[Serializer\Groups(['read', 'write', 'docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255, nullable: true)]
private ?string $name = null;
/**
* @ORM\Column(type="phone_number", nullable=true)
*
* @PhonenumberConstraint(type="any")
*/
#[Serializer\Groups(['read', 'write', 'docgen:read'])]
#[ORM\Column(type: 'phone_number', nullable: true)]
private ?PhoneNumber $phonenumber1 = null;
/**
* @ORM\Column(type="phone_number", nullable=true)
*
* @PhonenumberConstraint(type="any")
*/
#[Serializer\Groups(['read', 'write', 'docgen:read'])]
#[ORM\Column(type: 'phone_number', nullable: true)]
private ?PhoneNumber $phonenumber2 = null;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
#[Serializer\Groups(['read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $updatedAt = null;
/**
* @ORM\ManyToOne(targetEntity=User::class)
*/
#[Serializer\Groups(['read'])]
#[ORM\ManyToOne(targetEntity: User::class)]
private ?User $updatedBy = null;
public function getActive(): ?bool