mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Apply rector rules: add annotation for doctrine mapping
This commit is contained in:
parent
72016e1a21
commit
a3f775a69b
@ -45,6 +45,10 @@ return static function (RectorConfig $rectorConfig): void {
|
|||||||
\Rector\Doctrine\Set\DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
|
\Rector\Doctrine\Set\DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$rectorConfig->ruleWithConfiguration(\Rector\Php80\Rector\Class_\AnnotationToAttributeRector::class, [
|
||||||
|
new \Rector\Php80\ValueObject\AnnotationToAttribute('Symfony\Component\Serializer\Annotation\Context'),
|
||||||
|
]);
|
||||||
|
|
||||||
// migrate for phpunit
|
// migrate for phpunit
|
||||||
$rectorConfig->rules([
|
$rectorConfig->rules([
|
||||||
\Rector\PHPUnit\PHPUnit100\Rector\Class_\StaticDataProviderClassMethodRector::class,
|
\Rector\PHPUnit\PHPUnit100\Rector\Class_\StaticDataProviderClassMethodRector::class,
|
||||||
|
@ -136,12 +136,10 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
|
|||||||
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Location::class)]
|
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Location::class)]
|
||||||
private ?Location $location = null;
|
private ?Location $location = null;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Serializer\Context(normalizationContext={"read"}, groups={"calendar:light"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['calendar:read', 'read', 'calendar:light', 'docgen:read'])]
|
#[Serializer\Groups(['calendar:read', 'read', 'calendar:light', 'docgen:read'])]
|
||||||
#[Assert\NotNull(message: 'calendar.A main user is mandatory')]
|
#[Assert\NotNull(message: 'calendar.A main user is mandatory')]
|
||||||
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\User::class)]
|
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\User::class)]
|
||||||
|
#[Serializer\Context(normalizationContext: ['read'], groups: ['calendar:light'])]
|
||||||
private ?User $mainUser = null;
|
private ?User $mainUser = null;
|
||||||
|
|
||||||
|
|
||||||
@ -152,7 +150,6 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @Serializer\Context(normalizationContext={"read"}, groups={"calendar:light"})
|
|
||||||
*
|
*
|
||||||
* @var Collection<Person>
|
* @var Collection<Person>
|
||||||
*/
|
*/
|
||||||
@ -160,6 +157,7 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
|
|||||||
#[Assert\Count(min: 1, minMessage: 'calendar.At least {{ limit }} person is required.')]
|
#[Assert\Count(min: 1, minMessage: 'calendar.At least {{ limit }} person is required.')]
|
||||||
#[ORM\ManyToMany(targetEntity: \Chill\PersonBundle\Entity\Person::class, inversedBy: 'calendars')]
|
#[ORM\ManyToMany(targetEntity: \Chill\PersonBundle\Entity\Person::class, inversedBy: 'calendars')]
|
||||||
#[ORM\JoinTable(name: 'chill_calendar.calendar_to_persons')]
|
#[ORM\JoinTable(name: 'chill_calendar.calendar_to_persons')]
|
||||||
|
#[Serializer\Context(normalizationContext: ['read'], groups: ['calendar:light'])]
|
||||||
private Collection $persons;
|
private Collection $persons;
|
||||||
|
|
||||||
#[Serializer\Groups(['calendar:read'])]
|
#[Serializer\Groups(['calendar:read'])]
|
||||||
@ -170,12 +168,11 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
|
|||||||
* @var Collection<ThirdParty>
|
* @var Collection<ThirdParty>
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @Serializer\Context(normalizationContext={"read"}, groups={"calendar:light"})
|
|
||||||
*/
|
*/
|
||||||
#[Serializer\Groups(['calendar:read', 'read', 'calendar:light', 'docgen:read'])]
|
#[Serializer\Groups(['calendar:read', 'read', 'calendar:light', 'docgen:read'])]
|
||||||
#[ORM\ManyToMany(targetEntity: \Chill\ThirdPartyBundle\Entity\ThirdParty::class)]
|
#[ORM\ManyToMany(targetEntity: \Chill\ThirdPartyBundle\Entity\ThirdParty::class)]
|
||||||
#[ORM\JoinTable(name: 'chill_calendar.calendar_to_thirdparties')]
|
#[ORM\JoinTable(name: 'chill_calendar.calendar_to_thirdparties')]
|
||||||
|
#[Serializer\Context(normalizationContext: ['read'], groups: ['calendar:light'])]
|
||||||
private Collection $professionals;
|
private Collection $professionals;
|
||||||
|
|
||||||
#[Serializer\Groups(['docgen:read'])]
|
#[Serializer\Groups(['docgen:read'])]
|
||||||
@ -185,19 +182,15 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
|
|||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false, options: ['default' => Calendar::SMS_PENDING])]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false, options: ['default' => Calendar::SMS_PENDING])]
|
||||||
private string $smsStatus = self::SMS_PENDING;
|
private string $smsStatus = self::SMS_PENDING;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Serializer\Context(normalizationContext={"read"}, groups={"calendar:light"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['calendar:read', 'read', 'calendar:light', 'docgen:read'])]
|
#[Serializer\Groups(['calendar:read', 'read', 'calendar:light', 'docgen:read'])]
|
||||||
#[Assert\NotNull(message: 'calendar.A start date is required')]
|
#[Assert\NotNull(message: 'calendar.A start date is required')]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: false)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: false)]
|
||||||
|
#[Serializer\Context(normalizationContext: ['read'], groups: ['calendar:light'])]
|
||||||
private ?\DateTimeImmutable $startDate = null;
|
private ?\DateTimeImmutable $startDate = null;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Serializer\Context(normalizationContext={"read"}, groups={"calendar:light"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['calendar:read', 'read', 'calendar:light'])]
|
#[Serializer\Groups(['calendar:read', 'read', 'calendar:light'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255, nullable: false, options: ['default' => 'valid'])]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255, nullable: false, options: ['default' => 'valid'])]
|
||||||
|
#[Serializer\Context(normalizationContext: ['read'], groups: ['calendar:light'])]
|
||||||
private string $status = self::STATUS_VALID;
|
private string $status = self::STATUS_VALID;
|
||||||
|
|
||||||
#[Serializer\Groups(['docgen:read'])]
|
#[Serializer\Groups(['docgen:read'])]
|
||||||
|
@ -237,10 +237,8 @@ final class DocGenObjectNormalizerTest extends KernelTestCase
|
|||||||
|
|
||||||
class TestableParentClass
|
class TestableParentClass
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @Serializer\Context(normalizationContext={"groups": "docgen:read:foo"}, groups={"docgen:read"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups('docgen:read')]
|
#[Serializer\Groups('docgen:read')]
|
||||||
|
#[Serializer\Context(normalizationContext: ['groups' => 'docgen:read:foo'], groups: ['docgen:read'])]
|
||||||
public ?TestableChildClass $child;
|
public ?TestableChildClass $child;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
@ -20,11 +20,9 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
|||||||
#[ORM\Table(name: 'chill_main_civility')]
|
#[ORM\Table(name: 'chill_main_civility')]
|
||||||
class Civility
|
class Civility
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||||
|
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
private array $abbreviation = [];
|
private array $abbreviation = [];
|
||||||
|
|
||||||
#[Serializer\Groups(['read'])]
|
#[Serializer\Groups(['read'])]
|
||||||
@ -38,11 +36,9 @@ class Civility
|
|||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||||
private ?int $id = null;
|
private ?int $id = null;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||||
|
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
private array $name = [];
|
private array $name = [];
|
||||||
|
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT, name: 'ordering', nullable: true, options: ['default' => '0.0'])]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT, name: 'ordering', nullable: true, options: ['default' => '0.0'])]
|
||||||
|
@ -28,11 +28,9 @@ use Symfony\Component\Serializer\Annotation\Groups;
|
|||||||
#[ORM\Table(name: 'country')]
|
#[ORM\Table(name: 'country')]
|
||||||
class Country
|
class Country
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
|
||||||
#[Groups(['read', 'docgen:read'])]
|
#[Groups(['read', 'docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 3)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 3)]
|
||||||
|
#[Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
private string $countryCode = '';
|
private string $countryCode = '';
|
||||||
|
|
||||||
|
|
||||||
@ -45,11 +43,10 @@ class Country
|
|||||||
/**
|
/**
|
||||||
* @var array<string, string>
|
* @var array<string, string>
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
*/
|
||||||
#[Groups(['read', 'docgen:read'])]
|
#[Groups(['read', 'docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||||
|
#[Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
private array $name = [];
|
private array $name = [];
|
||||||
|
|
||||||
public function getCountryCode(): string
|
public function getCountryCode(): string
|
||||||
|
@ -36,11 +36,10 @@ class Language
|
|||||||
/**
|
/**
|
||||||
* @var string array
|
* @var string array
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
*/
|
||||||
#[Serializer\Groups(['docgen:read'])]
|
#[Serializer\Groups(['docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||||
|
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
private array $name = [];
|
private array $name = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -65,11 +65,9 @@ class LocationType
|
|||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||||
private ?int $id = null;
|
private ?int $id = null;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||||
|
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
private array $title = [];
|
private array $title = [];
|
||||||
|
|
||||||
public function getActive(): ?bool
|
public function getActive(): ?bool
|
||||||
|
@ -38,11 +38,10 @@ class Scope
|
|||||||
/**
|
/**
|
||||||
* translatable names.
|
* translatable names.
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
*/
|
||||||
#[Groups(['read', 'docgen:read'])]
|
#[Groups(['read', 'docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||||
|
#[Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
private array $name = [];
|
private array $name = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -33,11 +33,10 @@ class UserJob
|
|||||||
/**
|
/**
|
||||||
* @var array<string, string>
|
* @var array<string, string>
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
*/
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||||
#[ORM\Column(name: 'label', type: \Doctrine\DBAL\Types\Types::JSON)]
|
#[ORM\Column(name: 'label', type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||||
|
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
protected array $label = [];
|
protected array $label = [];
|
||||||
|
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
|
@ -35,11 +35,9 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||||||
#[ORM\Table(name: 'chill_person_accompanying_period_work')]
|
#[ORM\Table(name: 'chill_person_accompanying_period_work')]
|
||||||
class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterface, TrackCreationInterface, TrackUpdateInterface
|
class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterface, TrackCreationInterface, TrackUpdateInterface
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @Serializer\Context(normalizationContext={"groups": {"read"}}, groups={"read:accompanyingPeriodWork:light"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['read', 'read:accompanyingPeriodWork:light'])]
|
#[Serializer\Groups(['read', 'read:accompanyingPeriodWork:light'])]
|
||||||
#[ORM\ManyToOne(targetEntity: AccompanyingPeriod::class)]
|
#[ORM\ManyToOne(targetEntity: AccompanyingPeriod::class)]
|
||||||
|
#[Serializer\Context(normalizationContext: ['groups' => ['read']], groups: ['read:accompanyingPeriodWork:light'])]
|
||||||
private ?AccompanyingPeriod $accompanyingPeriod = null;
|
private ?AccompanyingPeriod $accompanyingPeriod = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -129,11 +127,9 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
|
|||||||
#[ORM\JoinTable(name: 'chill_person_accompanying_period_work_result')]
|
#[ORM\JoinTable(name: 'chill_person_accompanying_period_work_result')]
|
||||||
private Collection $results;
|
private Collection $results;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Serializer\Context(normalizationContext={"groups": {"read"}}, groups={"read:accompanyingPeriodWork:light"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['read', 'docgen:read', 'read:accompanyingPeriodWork:light', 'accompanying_period_work:create'])]
|
#[Serializer\Groups(['read', 'docgen:read', 'read:accompanyingPeriodWork:light', 'accompanying_period_work:create'])]
|
||||||
#[ORM\ManyToOne(targetEntity: SocialAction::class)]
|
#[ORM\ManyToOne(targetEntity: SocialAction::class)]
|
||||||
|
#[Serializer\Context(normalizationContext: ['groups' => ['read']], groups: ['read:accompanyingPeriodWork:light'])]
|
||||||
private ?SocialAction $socialAction = null;
|
private ?SocialAction $socialAction = null;
|
||||||
|
|
||||||
#[Serializer\Groups(['accompanying_period_work:create', 'accompanying_period_work:edit', 'read', 'docgen:read', 'read:accompanyingPeriodWork:light'])]
|
#[Serializer\Groups(['accompanying_period_work:create', 'accompanying_period_work:edit', 'read', 'docgen:read', 'read:accompanyingPeriodWork:light'])]
|
||||||
|
@ -27,11 +27,9 @@ use Symfony\Component\Serializer\Annotation as Serializer;
|
|||||||
#[ORM\Table('chill_person_accompanying_period_work_evaluation')]
|
#[ORM\Table('chill_person_accompanying_period_work_evaluation')]
|
||||||
class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackUpdateInterface
|
class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackUpdateInterface
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* @Serializer\Context(normalizationContext={"groups": {"read:accompanyingPeriodWork:light"}}, groups={"read:evaluation:include-work"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['read:evaluation:include-work'])]
|
#[Serializer\Groups(['read:evaluation:include-work'])]
|
||||||
#[ORM\ManyToOne(targetEntity: AccompanyingPeriodWork::class, inversedBy: 'accompanyingPeriodWorkEvaluations')]
|
#[ORM\ManyToOne(targetEntity: AccompanyingPeriodWork::class, inversedBy: 'accompanyingPeriodWorkEvaluations')]
|
||||||
|
#[Serializer\Context(normalizationContext: ['groups' => ['read:accompanyingPeriodWork:light']], groups: ['read:evaluation:include-work'])]
|
||||||
private ?AccompanyingPeriodWork $accompanyingPeriodWork = null;
|
private ?AccompanyingPeriodWork $accompanyingPeriodWork = null;
|
||||||
|
|
||||||
#[Serializer\Groups(['read', 'docgen:read', 'write', 'accompanying_period_work_evaluation:create'])]
|
#[Serializer\Groups(['read', 'docgen:read', 'write', 'accompanying_period_work_evaluation:create'])]
|
||||||
|
@ -43,11 +43,9 @@ class ClosingMotive
|
|||||||
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
#[ORM\GeneratedValue(strategy: 'AUTO')]
|
||||||
private ?int $id = null;
|
private ?int $id = null;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['docgen:read'])]
|
#[Serializer\Groups(['docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||||
|
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
private array $name = [];
|
private array $name = [];
|
||||||
|
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT)]
|
||||||
|
@ -27,11 +27,9 @@ class Origin
|
|||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||||
private ?int $id = null;
|
private ?int $id = null;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||||
|
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
private array $label = [];
|
private array $label = [];
|
||||||
|
|
||||||
#[Serializer\Groups(['read'])]
|
#[Serializer\Groups(['read'])]
|
||||||
|
@ -30,11 +30,9 @@ class HouseholdCompositionType
|
|||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||||
private ?int $id = null;
|
private ?int $id = null;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||||
|
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
private array $label = [];
|
private array $label = [];
|
||||||
|
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
|
@ -46,13 +46,11 @@ class HouseholdMember
|
|||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||||
private ?int $id = null;
|
private ?int $id = null;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Serializer\Context({"docgen:person:with-household": false})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||||
#[Assert\Valid(groups: ['household_memberships'])]
|
#[Assert\Valid(groups: ['household_memberships'])]
|
||||||
#[Assert\NotNull(groups: ['household_memberships'])]
|
#[Assert\NotNull(groups: ['household_memberships'])]
|
||||||
#[ORM\ManyToOne(targetEntity: Person::class)]
|
#[ORM\ManyToOne(targetEntity: Person::class)]
|
||||||
|
#[Serializer\Context(['docgen:person:with-household' => false])]
|
||||||
private ?Person $person = null;
|
private ?Person $person = null;
|
||||||
|
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||||
|
@ -31,11 +31,9 @@ class Position
|
|||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
|
||||||
private ?int $id = null;
|
private ?int $id = null;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||||
|
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
private array $label = [];
|
private array $label = [];
|
||||||
|
|
||||||
#[Serializer\Groups(['read'])]
|
#[Serializer\Groups(['read'])]
|
||||||
|
@ -29,11 +29,9 @@ class PersonResourceKind
|
|||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
|
||||||
private bool $isActive = true;
|
private bool $isActive = true;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['docgen:read'])]
|
#[Serializer\Groups(['docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON, length: 255)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON, length: 255)]
|
||||||
|
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
private array $title;
|
private array $title;
|
||||||
|
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
|
@ -38,14 +38,11 @@ class ResidentialAddress
|
|||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true)]
|
||||||
private ?\DateTimeImmutable $endDate = null;
|
private ?\DateTimeImmutable $endDate = null;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @Context(normalizationContext={"groups": {"minimal"}})
|
|
||||||
*/
|
|
||||||
#[Groups(['read'])]
|
#[Groups(['read'])]
|
||||||
#[ORM\ManyToOne(targetEntity: Person::class)]
|
#[ORM\ManyToOne(targetEntity: Person::class)]
|
||||||
#[ORM\JoinColumn(nullable: true)]
|
#[ORM\JoinColumn(nullable: true)]
|
||||||
|
#[Context(normalizationContext: ['groups' => ['minimal']])]
|
||||||
private ?Person $hostPerson = null;
|
private ?Person $hostPerson = null;
|
||||||
|
|
||||||
|
|
||||||
|
@ -32,18 +32,14 @@ class Relation
|
|||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: true)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: true)]
|
||||||
private bool $isActive = true;
|
private bool $isActive = true;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['read'])]
|
#[Serializer\Groups(['read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON, nullable: true)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON, nullable: true)]
|
||||||
|
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
private array $reverseTitle = [];
|
private array $reverseTitle = [];
|
||||||
|
|
||||||
/**
|
|
||||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['read'])]
|
#[Serializer\Groups(['read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON, nullable: true)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON, nullable: true)]
|
||||||
|
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
private array $title = [];
|
private array $title = [];
|
||||||
|
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
|
@ -47,11 +47,9 @@ class Evaluation
|
|||||||
#[ORM\ManyToMany(targetEntity: SocialAction::class, mappedBy: 'evaluations')]
|
#[ORM\ManyToMany(targetEntity: SocialAction::class, mappedBy: 'evaluations')]
|
||||||
private Collection $socialActions;
|
private Collection $socialActions;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||||
|
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
private array $title = [];
|
private array $title = [];
|
||||||
|
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||||
|
@ -47,11 +47,9 @@ class Goal
|
|||||||
#[ORM\ManyToMany(targetEntity: SocialAction::class, mappedBy: 'goals')]
|
#[ORM\ManyToMany(targetEntity: SocialAction::class, mappedBy: 'goals')]
|
||||||
private Collection $socialActions;
|
private Collection $socialActions;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||||
|
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
private array $title = [];
|
private array $title = [];
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
@ -59,11 +59,9 @@ class Result
|
|||||||
#[ORM\ManyToMany(targetEntity: SocialAction::class, mappedBy: 'results')]
|
#[ORM\ManyToMany(targetEntity: SocialAction::class, mappedBy: 'results')]
|
||||||
private Collection $socialActions;
|
private Collection $socialActions;
|
||||||
|
|
||||||
/**
|
|
||||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
|
||||||
*/
|
|
||||||
#[Serializer\Groups(['read', 'docgen:read'])]
|
#[Serializer\Groups(['read', 'docgen:read'])]
|
||||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
|
||||||
|
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
|
||||||
private array $title = [];
|
private array $title = [];
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
@ -97,14 +97,11 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
|||||||
#[ORM\Column(name: 'active', type: \Doctrine\DBAL\Types\Types::BOOLEAN, options: ['defaut' => true])]
|
#[ORM\Column(name: 'active', type: \Doctrine\DBAL\Types\Types::BOOLEAN, options: ['defaut' => true])]
|
||||||
private bool $active = true;
|
private bool $active = true;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* @Context(normalizationContext={"groups": "docgen:read"}, groups={"docgen:read:3party:parent"})
|
|
||||||
*/
|
|
||||||
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
||||||
#[ORM\ManyToOne(targetEntity: Address::class, cascade: ['persist', 'remove'])]
|
#[ORM\ManyToOne(targetEntity: Address::class, cascade: ['persist', 'remove'])]
|
||||||
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
|
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
|
||||||
|
#[Context(normalizationContext: ['groups' => 'docgen:read'], groups: ['docgen:read:3party:parent'])]
|
||||||
private ?Address $address = null;
|
private ?Address $address = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -119,12 +116,11 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
|||||||
* @var Collection<ThirdPartyCategory>
|
* @var Collection<ThirdPartyCategory>
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @Context(normalizationContext={"groups": "docgen:read"}, groups={"docgen:read:3party:parent"})
|
|
||||||
*/
|
*/
|
||||||
#[Groups(['docgen:read', 'docgen:read:3party:parent'])]
|
#[Groups(['docgen:read', 'docgen:read:3party:parent'])]
|
||||||
#[ORM\ManyToMany(targetEntity: \Chill\ThirdPartyBundle\Entity\ThirdPartyCategory::class)]
|
#[ORM\ManyToMany(targetEntity: \Chill\ThirdPartyBundle\Entity\ThirdPartyCategory::class)]
|
||||||
#[ORM\JoinTable(name: 'chill_3party.thirdparty_category', joinColumns: [new ORM\JoinColumn(name: 'thirdparty_id', referencedColumnName: 'id')], inverseJoinColumns: [new ORM\JoinColumn(name: 'category_id', referencedColumnName: 'id')])]
|
#[ORM\JoinTable(name: 'chill_3party.thirdparty_category', joinColumns: [new ORM\JoinColumn(name: 'thirdparty_id', referencedColumnName: 'id')], inverseJoinColumns: [new ORM\JoinColumn(name: 'category_id', referencedColumnName: 'id')])]
|
||||||
|
#[Context(normalizationContext: ['groups' => 'docgen:read'], groups: ['docgen:read:3party:parent'])]
|
||||||
private Collection $categories;
|
private Collection $categories;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -206,22 +202,20 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin
|
|||||||
* Institutional ThirdParty: Many Contact Persons have One Institutional ThirdParty.
|
* Institutional ThirdParty: Many Contact Persons have One Institutional ThirdParty.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @Context(normalizationContext={"groups": "docgen:read:3party:parent"}, groups={"docgen:read"})
|
|
||||||
*/
|
*/
|
||||||
#[Groups(['read', 'write', 'docgen:read'])]
|
#[Groups(['read', 'write', 'docgen:read'])]
|
||||||
#[ORM\ManyToOne(targetEntity: ThirdParty::class, inversedBy: 'children')]
|
#[ORM\ManyToOne(targetEntity: ThirdParty::class, inversedBy: 'children')]
|
||||||
#[ORM\JoinColumn(name: 'parent_id', referencedColumnName: 'id')]
|
#[ORM\JoinColumn(name: 'parent_id', referencedColumnName: 'id')]
|
||||||
|
#[Context(normalizationContext: ['groups' => 'docgen:read:3party:parent'], groups: ['docgen:read'])]
|
||||||
private ?ThirdParty $parent = null;
|
private ?ThirdParty $parent = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [fr] Qualité.
|
* [fr] Qualité.
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @Context(normalizationContext={"groups": "docgen:read"}, groups={"docgen:read:3party:parent"})
|
|
||||||
*/
|
*/
|
||||||
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
#[Groups(['read', 'write', 'docgen:read', 'docgen:read:3party:parent'])]
|
||||||
#[ORM\Column(name: 'profession', type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false)]
|
#[ORM\Column(name: 'profession', type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false)]
|
||||||
|
#[Context(normalizationContext: ['groups' => 'docgen:read'], groups: ['docgen:read:3party:parent'])]
|
||||||
private string $profession = '';
|
private string $profession = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user