mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 06:14:59 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -18,51 +18,32 @@ use libphonenumber\PhoneNumber;
|
||||
/**
|
||||
* Person Phones.
|
||||
*
|
||||
* @ORM\Entity
|
||||
*
|
||||
* @ORM\Table(name="chill_person_phone",
|
||||
* indexes={
|
||||
*
|
||||
* @ORM\Index(name="phonenumber", columns={"phonenumber"})
|
||||
* })
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
#[ORM\Table(name: 'chill_person_phone')]
|
||||
#[ORM\Index(name: 'phonenumber', columns: ['phonenumber'])]
|
||||
#[ORM\Index(name: 'phonenumber', columns: ['phonenumber'])]
|
||||
class PersonPhone
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="datetime", nullable=false)
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE, nullable: false)]
|
||||
private \DateTime $date;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
|
||||
private ?string $description = 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;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(
|
||||
* targetEntity="Chill\PersonBundle\Entity\Person",
|
||||
* inversedBy="otherPhoneNumbers"
|
||||
* )
|
||||
*/
|
||||
#[ORM\ManyToOne(targetEntity: \Chill\PersonBundle\Entity\Person::class, inversedBy: 'otherPhoneNumbers')]
|
||||
private Person $person;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="phone_number", nullable=false)
|
||||
*/
|
||||
#[ORM\Column(type: 'phone_number', nullable: false)]
|
||||
private ?PhoneNumber $phonenumber = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="text", length=40, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, length: 40, nullable: true)]
|
||||
private ?string $type = null;
|
||||
|
||||
public function __construct()
|
||||
|
Reference in New Issue
Block a user