mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 23:04:58 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
@@ -17,7 +17,6 @@ use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
|
||||
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
|
||||
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
|
||||
use Chill\ThirdPartyBundle\Entity\ThirdParty;
|
||||
use DateTime;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
@@ -26,9 +25,6 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
|
||||
/**
|
||||
* Address.
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
@@ -99,17 +95,12 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
* @var Collection<GeographicalUnit>
|
||||
*
|
||||
* @readonly
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[ORM\ManyToMany(targetEntity: GeographicalUnit::class)]
|
||||
#[ORM\JoinTable(name: 'view_chill_main_address_geographical_unit', joinColumns: [new ORM\JoinColumn(name: 'address_id')], inverseJoinColumns: [new ORM\JoinColumn(name: 'geographical_unit_id')])]
|
||||
private Collection $geographicalUnits;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
* @readonly
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
@@ -127,11 +118,9 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
|
||||
/**
|
||||
* A ThirdParty reference for person's addresses that are linked to a third party.
|
||||
*
|
||||
*
|
||||
*/
|
||||
#[Groups(['write'])]
|
||||
#[ORM\ManyToOne(targetEntity: \Chill\ThirdPartyBundle\Entity\ThirdParty::class)]
|
||||
#[ORM\ManyToOne(targetEntity: ThirdParty::class)]
|
||||
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
|
||||
private ?ThirdParty $linkedToThirdParty = null;
|
||||
|
||||
@@ -142,9 +131,8 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
|
||||
#[ORM\Column(type: 'point', nullable: true)]
|
||||
private ?Point $point = null;
|
||||
|
||||
|
||||
#[Groups(['write'])]
|
||||
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\PostalCode::class)]
|
||||
#[ORM\ManyToOne(targetEntity: PostalCode::class)]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private ?PostalCode $postcode = null;
|
||||
|
||||
|
Reference in New Issue
Block a user