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

@@ -15,101 +15,70 @@ use Chill\MainBundle\Doctrine\Model\Point;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity
*
* @ORM\Table(name="chill_main_address_reference", indexes={
*
* @ORM\Index(name="address_refid", columns={"refId"})
* },
* uniqueConstraints={
*
* @ORM\UniqueConstraint(name="chill_main_address_reference_unicity", columns={"refId", "source"})
* })
*
* @ORM\HasLifecycleCallbacks
*/
#[ORM\Entity]
#[ORM\HasLifecycleCallbacks]
#[ORM\Table(name: 'chill_main_address_reference')]
#[ORM\Index(name: 'address_refid', columns: ['refId'])]
#[ORM\UniqueConstraint(name: 'chill_main_address_reference_unicity', columns: ['refId', 'source'])]
class AddressReference
{
/**
* This is an internal column which is populated by database.
*
* This column will ease the search operations
*
* @ORM\Column(type="text", options={"default": ""})
*/
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, options: ['default' => ''])]
private string $addressCanonical = '';
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
#[Groups(['read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $createdAt = null;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
#[Groups(['read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $deletedAt = null;
/**
* @ORM\Id
*
* @ORM\GeneratedValue
*
* @ORM\Column(type="integer")
*/
#[Groups(['read'])]
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null;
/**
* @ORM\Column(type="text", nullable=false, options={"default": ""})
*/
#[Groups(['read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false, options: ['default' => ''])]
private string $municipalityCode = '';
/**
* A geospatial field storing the coordinates of the Address.
*
* @ORM\Column(type="point")
*/
#[Groups(['read'])]
#[ORM\Column(type: 'point')]
private ?Point $point = null;
/**
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\PostalCode")
*/
#[Groups(['read'])]
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\PostalCode::class)]
private ?PostalCode $postcode = null;
/**
* @ORM\Column(type="text", nullable=false, options={"default": ""})
*/
#[Groups(['read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false, options: ['default' => ''])]
private string $refId = '';
/**
* @ORM\Column(type="text", nullable=false, options={"default": ""})
*/
#[Groups(['read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false, options: ['default' => ''])]
private string $source = '';
/**
* @ORM\Column(type="text", nullable=false, options={"default": ""})
*/
#[Groups(['read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false, options: ['default' => ''])]
private string $street = '';
/**
* @ORM\Column(type="text", nullable=false, options={"default": ""})
*/
#[Groups(['read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false, options: ['default' => ''])]
private string $streetNumber = '';
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
#[Groups(['read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $updatedAt = null;
public function getCreatedAt(): ?\DateTimeImmutable