Apply rector rules: add annotation for doctrine mapping

This commit is contained in:
Julien Fastré 2024-04-05 13:11:42 +02:00
parent a3f775a69b
commit 0ff4593863
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
118 changed files with 143 additions and 658 deletions

View File

@ -32,7 +32,6 @@ use Chill\PersonBundle\Entity\Person;
use Chill\PersonBundle\Entity\SocialWork\SocialAction; use Chill\PersonBundle\Entity\SocialWork\SocialAction;
use Chill\PersonBundle\Entity\SocialWork\SocialIssue; use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
use Chill\ThirdPartyBundle\Entity\ThirdParty; use Chill\ThirdPartyBundle\Entity\ThirdParty;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
@ -44,9 +43,6 @@ use Symfony\Component\Validator\Constraints as Assert;
/** /**
* Class Activity. * Class Activity.
* *
*
*
*
* @ActivityValidator\ActivityValidity * @ActivityValidator\ActivityValidity
* *
* TODO see if necessary * TODO see if necessary
@ -70,22 +66,21 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
final public const SENTRECEIVED_SENT = 'sent'; final public const SENTRECEIVED_SENT = 'sent';
#[Groups(['read'])] #[Groups(['read'])]
#[ORM\ManyToOne(targetEntity: \Chill\PersonBundle\Entity\AccompanyingPeriod::class)] #[ORM\ManyToOne(targetEntity: AccompanyingPeriod::class)]
private ?AccompanyingPeriod $accompanyingPeriod = null; private ?AccompanyingPeriod $accompanyingPeriod = null;
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[SerializedName('activityType')] #[SerializedName('activityType')]
#[ORM\ManyToOne(targetEntity: \Chill\ActivityBundle\Entity\ActivityType::class)] #[ORM\ManyToOne(targetEntity: ActivityType::class)]
#[ORM\JoinColumn(name: 'type_id')] #[ORM\JoinColumn(name: 'type_id')]
private ActivityType $activityType; private ActivityType $activityType;
#[Groups(['docgen:read'])] #[Groups(['docgen:read'])]
#[ORM\ManyToOne(targetEntity: \Chill\ActivityBundle\Entity\ActivityPresence::class)] #[ORM\ManyToOne(targetEntity: ActivityPresence::class)]
private ?ActivityPresence $attendee = null; private ?ActivityPresence $attendee = null;
#[Groups(['docgen:read'])] #[Groups(['docgen:read'])]
#[ORM\Embedded(class: \Chill\MainBundle\Entity\Embeddable\CommentEmbeddable::class, columnPrefix: 'comment_')] #[ORM\Embedded(class: CommentEmbeddable::class, columnPrefix: 'comment_')]
private CommentEmbeddable $comment; private CommentEmbeddable $comment;
#[Groups(['docgen:read'])] #[Groups(['docgen:read'])]
@ -96,7 +91,7 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
* @var Collection<StoredObject> * @var Collection<StoredObject>
*/ */
#[Assert\Valid(traverse: true)] #[Assert\Valid(traverse: true)]
#[ORM\ManyToMany(targetEntity: \Chill\DocStoreBundle\Entity\StoredObject::class, cascade: ['persist'])] #[ORM\ManyToMany(targetEntity: StoredObject::class, cascade: ['persist'])]
private Collection $documents; private Collection $documents;
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TIME_MUTABLE, nullable: true)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::TIME_MUTABLE, nullable: true)]
@ -106,7 +101,6 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, options: ['default' => false])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, options: ['default' => false])]
private bool $emergency = false; private bool $emergency = false;
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -114,31 +108,31 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
private ?int $id = null; private ?int $id = null;
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Location::class)] #[ORM\ManyToOne(targetEntity: Location::class)]
private ?Location $location = null; private ?Location $location = null;
#[ORM\ManyToOne(targetEntity: \Chill\PersonBundle\Entity\Person::class)] #[ORM\ManyToOne(targetEntity: Person::class)]
private ?Person $person = null; private ?Person $person = null;
/** /**
* @var Collection<Person> * @var Collection<Person>
*/ */
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\ManyToMany(targetEntity: \Chill\PersonBundle\Entity\Person::class)] #[ORM\ManyToMany(targetEntity: Person::class)]
private Collection $persons; private Collection $persons;
#[ORM\Embedded(class: \Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable::class, columnPrefix: 'privateComment_')] #[ORM\Embedded(class: PrivateCommentEmbeddable::class, columnPrefix: 'privateComment_')]
private PrivateCommentEmbeddable $privateComment; private PrivateCommentEmbeddable $privateComment;
/** /**
* @var Collection<ActivityReason> * @var Collection<ActivityReason>
*/ */
#[Groups(['docgen:read'])] #[Groups(['docgen:read'])]
#[ORM\ManyToMany(targetEntity: \Chill\ActivityBundle\Entity\ActivityReason::class)] #[ORM\ManyToMany(targetEntity: ActivityReason::class)]
private Collection $reasons; private Collection $reasons;
#[Groups(['docgen:read'])] #[Groups(['docgen:read'])]
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Scope::class)] #[ORM\ManyToOne(targetEntity: Scope::class)]
private ?Scope $scope = null; private ?Scope $scope = null;
#[Groups(['docgen:read'])] #[Groups(['docgen:read'])]
@ -146,22 +140,18 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
private string $sentReceived = ''; private string $sentReceived = '';
/** /**
*
*
* @var Collection<SocialAction> * @var Collection<SocialAction>
*/ */
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\ManyToMany(targetEntity: \Chill\PersonBundle\Entity\SocialWork\SocialAction::class)] #[ORM\ManyToMany(targetEntity: SocialAction::class)]
#[ORM\JoinTable(name: 'chill_activity_activity_chill_person_socialaction')] #[ORM\JoinTable(name: 'chill_activity_activity_chill_person_socialaction')]
private Collection $socialActions; private Collection $socialActions;
/** /**
*
*
* @var Collection<SocialIssue> * @var Collection<SocialIssue>
*/ */
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\ManyToMany(targetEntity: \Chill\PersonBundle\Entity\SocialWork\SocialIssue::class)] #[ORM\ManyToMany(targetEntity: SocialIssue::class)]
#[ORM\JoinTable(name: 'chill_activity_activity_chill_person_socialissue')] #[ORM\JoinTable(name: 'chill_activity_activity_chill_person_socialissue')]
private Collection $socialIssues; private Collection $socialIssues;
@ -169,21 +159,21 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
* @var Collection<ThirdParty> * @var Collection<ThirdParty>
*/ */
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\ManyToMany(targetEntity: \Chill\ThirdPartyBundle\Entity\ThirdParty::class)] #[ORM\ManyToMany(targetEntity: ThirdParty::class)]
private Collection $thirdParties; private Collection $thirdParties;
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TIME_MUTABLE, nullable: true)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::TIME_MUTABLE, nullable: true)]
private ?\DateTime $travelTime = null; private ?\DateTime $travelTime = null;
#[Groups(['docgen:read'])] #[Groups(['docgen:read'])]
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
private ?User $user = null; private ?User $user = null;
/** /**
* @var Collection<User> * @var Collection<User>
*/ */
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\ManyToMany(targetEntity: \Chill\MainBundle\Entity\User::class)] #[ORM\ManyToMany(targetEntity: User::class)]
private Collection $users; private Collection $users;
public function __construct() public function __construct()

View File

@ -16,9 +16,6 @@ use Symfony\Component\Serializer\Annotation as Serializer;
/** /**
* Class ActivityPresence. * Class ActivityPresence.
*
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
@ -28,18 +25,15 @@ class ActivityPresence
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
private bool $active = true; private bool $active = true;
#[Serializer\Groups(['docgen:read'])] #[Serializer\Groups(['docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[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 = [];
/** /**

View File

@ -15,9 +15,6 @@ use Doctrine\ORM\Mapping as ORM;
/** /**
* Class ActivityReason. * Class ActivityReason.
*
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
@ -27,10 +24,9 @@ class ActivityReason
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
private bool $active = true; private bool $active = true;
#[ORM\ManyToOne(targetEntity: \Chill\ActivityBundle\Entity\ActivityReasonCategory::class, inversedBy: 'reasons')] #[ORM\ManyToOne(targetEntity: ActivityReasonCategory::class, inversedBy: 'reasons')]
private ?ActivityReasonCategory $category = null; private ?ActivityReasonCategory $category = null;
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]

View File

@ -17,9 +17,6 @@ use Doctrine\ORM\Mapping as ORM;
/** /**
* Class ActivityReasonCategory. * Class ActivityReasonCategory.
*
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
@ -29,7 +26,6 @@ class ActivityReasonCategory implements \Stringable
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
private bool $active = true; private bool $active = true;
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]
@ -46,7 +42,7 @@ class ActivityReasonCategory implements \Stringable
* *
* @var Collection<ActivityReason> * @var Collection<ActivityReason>
*/ */
#[ORM\OneToMany(targetEntity: \Chill\ActivityBundle\Entity\ActivityReason::class, mappedBy: 'category')] #[ORM\OneToMany(targetEntity: ActivityReason::class, mappedBy: 'category')]
private Collection $reasons; private Collection $reasons;
/** /**

View File

@ -19,9 +19,6 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
/** /**
* Class ActivityType. * Class ActivityType.
*
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
@ -56,7 +53,7 @@ class ActivityType
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
private int $attendeeVisible = self::FIELD_OPTIONAL; private int $attendeeVisible = self::FIELD_OPTIONAL;
#[ORM\ManyToOne(targetEntity: \Chill\ActivityBundle\Entity\ActivityTypeCategory::class)] #[ORM\ManyToOne(targetEntity: ActivityTypeCategory::class)]
private ?ActivityTypeCategory $category = null; private ?ActivityTypeCategory $category = null;
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, nullable: false, options: ['default' => ''])]
@ -89,7 +86,6 @@ class ActivityType
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
private int $emergencyVisible = self::FIELD_INVISIBLE; private int $emergencyVisible = self::FIELD_INVISIBLE;
#[Groups(['docgen:read'])] #[Groups(['docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -102,11 +98,9 @@ class ActivityType
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::SMALLINT, nullable: false, options: ['default' => 1])]
private int $locationVisible = self::FIELD_INVISIBLE; private int $locationVisible = self::FIELD_INVISIBLE;
/**
* @Serializer\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)]
#[Serializer\Context(['is-translatable' => true], groups: ['docgen:read'])]
private array $name = []; private array $name = [];
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT, options: ['default' => '0.0'])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT, options: ['default' => '0.0'])]

View File

@ -13,7 +13,6 @@ namespace Chill\ActivityBundle\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity] #[ORM\Entity]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
#[ORM\Table(name: 'activitytypecategory')] #[ORM\Table(name: 'activitytypecategory')]
@ -22,7 +21,6 @@ class ActivityTypeCategory
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
private bool $active = true; private bool $active = true;
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]

View File

@ -18,12 +18,10 @@ use Chill\MainBundle\Entity\Location;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(schema: 'chill_asideactivity')] #[ORM\Table(schema: 'chill_asideactivity')]
class AsideActivity implements TrackCreationInterface, TrackUpdateInterface class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
{ {
#[Assert\NotBlank] #[Assert\NotBlank]
#[ORM\ManyToOne(targetEntity: User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
@ -32,7 +30,6 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $createdAt = null; private ?\DateTimeInterface $createdAt = null;
#[ORM\ManyToOne(targetEntity: User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private User $createdBy; private User $createdBy;
@ -43,13 +40,11 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TIME_MUTABLE, nullable: true)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::TIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $duration = null; private ?\DateTimeInterface $duration = null;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null; private ?int $id = null;
#[ORM\ManyToOne(targetEntity: Location::class)] #[ORM\ManyToOne(targetEntity: Location::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?Location $location = null; private ?Location $location = null;
@ -57,7 +52,6 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
private ?string $note = null; private ?string $note = null;
#[ORM\ManyToOne(targetEntity: AsideActivityCategory::class, inversedBy: 'asideActivities')] #[ORM\ManyToOne(targetEntity: AsideActivityCategory::class, inversedBy: 'asideActivities')]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private ?AsideActivityCategory $type = null; private ?AsideActivityCategory $type = null;

View File

@ -17,7 +17,6 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(schema: 'chill_asideactivity')] #[ORM\Table(schema: 'chill_asideactivity')]
class AsideActivityCategory class AsideActivityCategory
@ -28,7 +27,6 @@ class AsideActivityCategory
#[ORM\OneToMany(targetEntity: AsideActivityCategory::class, mappedBy: 'parent')] #[ORM\OneToMany(targetEntity: AsideActivityCategory::class, mappedBy: 'parent')]
private Collection $children; private Collection $children;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -42,7 +40,6 @@ class AsideActivityCategory
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT, options: ['default' => '0.00'])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT, options: ['default' => '0.00'])]
private float $ordering = 0.00; private float $ordering = 0.00;
#[ORM\ManyToOne(targetEntity: AsideActivityCategory::class, inversedBy: 'children')] #[ORM\ManyToOne(targetEntity: AsideActivityCategory::class, inversedBy: 'children')]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?AsideActivityCategory $parent = null; private ?AsideActivityCategory $parent = null;

View File

@ -13,9 +13,7 @@ namespace Chill\BudgetBundle\Entity;
use Chill\PersonBundle\Entity\Household\Household; use Chill\PersonBundle\Entity\Household\Household;
use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\Person;
use DateTime;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Ramsey\Uuid\Type\Decimal;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
/** /**

View File

@ -17,8 +17,6 @@ use Doctrine\ORM\Mapping as ORM;
/** /**
* Charge. * Charge.
*
*
*/ */
#[ORM\Entity(repositoryClass: \Chill\BudgetBundle\Repository\ChargeRepository::class)] #[ORM\Entity(repositoryClass: \Chill\BudgetBundle\Repository\ChargeRepository::class)]
#[ORM\Table(name: 'chill_budget.charge')] #[ORM\Table(name: 'chill_budget.charge')]
@ -39,7 +37,6 @@ class Charge extends AbstractElement implements HasCentersInterface
self::HELP_NOT_RELEVANT, self::HELP_NOT_RELEVANT,
]; ];
#[ORM\ManyToOne(targetEntity: ChargeKind::class, inversedBy: 'AbstractElement')] #[ORM\ManyToOne(targetEntity: ChargeKind::class, inversedBy: 'AbstractElement')]
#[ORM\JoinColumn] #[ORM\JoinColumn]
private ?ChargeKind $charge = null; private ?ChargeKind $charge = null;
@ -47,7 +44,6 @@ class Charge extends AbstractElement implements HasCentersInterface
#[ORM\Column(name: 'help', type: \Doctrine\DBAL\Types\Types::STRING, nullable: true)] #[ORM\Column(name: 'help', type: \Doctrine\DBAL\Types\Types::STRING, nullable: true)]
private ?string $help = self::HELP_NOT_RELEVANT; private ?string $help = self::HELP_NOT_RELEVANT;
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]

View File

@ -17,8 +17,6 @@ use Symfony\Component\Validator\Constraints as Assert;
/** /**
* Type of charge. * Type of charge.
*
*
*/ */
#[UniqueEntity(fields: ['kind'])] #[UniqueEntity(fields: ['kind'])]
#[ORM\Entity] #[ORM\Entity]
@ -26,7 +24,6 @@ use Symfony\Component\Validator\Constraints as Assert;
#[ORM\UniqueConstraint(name: 'charge_kind_unique_type_idx', fields: ['kind'])] #[ORM\UniqueConstraint(name: 'charge_kind_unique_type_idx', fields: ['kind'])]
class ChargeKind class ChargeKind
{ {
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]

View File

@ -17,20 +17,16 @@ use Doctrine\ORM\Mapping as ORM;
/** /**
* Resource. * Resource.
*
*
*/ */
#[ORM\Entity(repositoryClass: \Chill\BudgetBundle\Repository\ResourceRepository::class)] #[ORM\Entity(repositoryClass: \Chill\BudgetBundle\Repository\ResourceRepository::class)]
#[ORM\Table(name: 'chill_budget.resource')] #[ORM\Table(name: 'chill_budget.resource')]
class Resource extends AbstractElement implements HasCentersInterface class Resource extends AbstractElement implements HasCentersInterface
{ {
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]
private ?int $id = null; private ?int $id = null;
#[ORM\ManyToOne(targetEntity: ResourceKind::class, inversedBy: 'AbstractElement')] #[ORM\ManyToOne(targetEntity: ResourceKind::class, inversedBy: 'AbstractElement')]
#[ORM\JoinColumn] #[ORM\JoinColumn]
private ?ResourceKind $resource = null; private ?ResourceKind $resource = null;

View File

@ -17,8 +17,6 @@ use Symfony\Component\Validator\Constraints as Assert;
/** /**
* Type of resource. * Type of resource.
*
*
*/ */
#[UniqueEntity(fields: ['kind'])] #[UniqueEntity(fields: ['kind'])]
#[ORM\UniqueConstraint(name: 'resource_kind_unique_type_idx', fields: ['kind'])] // @ORM\Entity #[ORM\UniqueConstraint(name: 'resource_kind_unique_type_idx', fields: ['kind'])] // @ORM\Entity
@ -28,7 +26,6 @@ use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity] // @ORM\Entity #[ORM\Entity] // @ORM\Entity
class ResourceKind class ResourceKind
{ {
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]

View File

@ -36,7 +36,6 @@ use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\Range; use Symfony\Component\Validator\Constraints\Range;
use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Mapping\ClassMetadata;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['chill_calendar_calendar' => Calendar::class])] #[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['chill_calendar_calendar' => Calendar::class])]
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_calendar.calendar')] #[ORM\Table(name: 'chill_calendar.calendar')]
@ -83,17 +82,17 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
public ?User $previousMainUser = null; public ?User $previousMainUser = null;
#[Serializer\Groups(['calendar:read', 'read'])] #[Serializer\Groups(['calendar:read', 'read'])]
#[ORM\ManyToOne(targetEntity: \Chill\PersonBundle\Entity\AccompanyingPeriod::class, inversedBy: 'calendars')] #[ORM\ManyToOne(targetEntity: AccompanyingPeriod::class, inversedBy: 'calendars')]
private ?AccompanyingPeriod $accompanyingPeriod = null; private ?AccompanyingPeriod $accompanyingPeriod = null;
#[ORM\ManyToOne(targetEntity: \Chill\ActivityBundle\Entity\Activity::class)] #[ORM\ManyToOne(targetEntity: Activity::class)]
private ?Activity $activity = null; private ?Activity $activity = null;
#[Serializer\Groups(['calendar:read', 'read'])] #[Serializer\Groups(['calendar:read', 'read'])]
#[ORM\OneToOne(targetEntity: \CalendarRange::class, inversedBy: 'calendar')] #[ORM\OneToOne(targetEntity: CalendarRange::class, inversedBy: 'calendar')]
private ?CalendarRange $calendarRange = null; private ?CalendarRange $calendarRange = null;
#[ORM\ManyToOne(targetEntity: \CancelReason::class)] #[ORM\ManyToOne(targetEntity: CancelReason::class)]
private ?CancelReason $cancelReason = null; private ?CancelReason $cancelReason = null;
#[Serializer\Groups(['calendar:read', 'read', 'docgen:read'])] #[Serializer\Groups(['calendar:read', 'read', 'docgen:read'])]
@ -114,7 +113,6 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: false)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: false)]
private ?\DateTimeImmutable $endDate = null; private ?\DateTimeImmutable $endDate = null;
#[Serializer\Groups(['calendar:read', 'read', 'calendar:light', 'docgen:read'])] #[Serializer\Groups(['calendar:read', 'read', 'calendar:light', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
@ -122,8 +120,6 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
private ?int $id = null; private ?int $id = null;
/** /**
*
*
* @var Collection&Selectable<int, Invite> * @var Collection&Selectable<int, Invite>
*/ */
#[Serializer\Groups(['read', 'docgen:read'])] #[Serializer\Groups(['read', 'docgen:read'])]
@ -133,29 +129,25 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
#[Serializer\Groups(['read', 'docgen:read'])] #[Serializer\Groups(['read', 'docgen:read'])]
#[Assert\NotNull(message: 'calendar.A location is required')] #[Assert\NotNull(message: 'calendar.A location is required')]
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Location::class)] #[ORM\ManyToOne(targetEntity: Location::class)]
private ?Location $location = null; private ?Location $location = null;
#[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: User::class)]
#[Serializer\Context(normalizationContext: ['read'], groups: ['calendar:light'])] #[Serializer\Context(normalizationContext: ['read'], groups: ['calendar:light'])]
private ?User $mainUser = null; private ?User $mainUser = null;
#[ORM\ManyToOne(targetEntity: Person::class)] #[ORM\ManyToOne(targetEntity: Person::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?Person $person = null; private ?Person $person = null;
/** /**
*
*
*
* @var Collection<Person> * @var Collection<Person>
*/ */
#[Serializer\Groups(['calendar:read', 'read', 'calendar:light', 'docgen:read'])] #[Serializer\Groups(['calendar:read', 'read', 'calendar:light', 'docgen:read'])]
#[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: 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'])] #[Serializer\Context(normalizationContext: ['read'], groups: ['calendar:light'])]
private Collection $persons; private Collection $persons;
@ -166,11 +158,9 @@ class Calendar implements TrackCreationInterface, TrackUpdateInterface, HasCente
/** /**
* @var Collection<ThirdParty> * @var Collection<ThirdParty>
*
*
*/ */
#[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: 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'])] #[Serializer\Context(normalizationContext: ['read'], groups: ['calendar:light'])]
private Collection $professionals; private Collection $professionals;

View File

@ -20,7 +20,6 @@ use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait; use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_calendar.calendar_doc')] #[ORM\Table(name: 'chill_calendar.calendar_doc')]
class CalendarDoc implements TrackCreationInterface, TrackUpdateInterface class CalendarDoc implements TrackCreationInterface, TrackUpdateInterface
@ -29,7 +28,6 @@ class CalendarDoc implements TrackCreationInterface, TrackUpdateInterface
use TrackUpdateTrait; use TrackUpdateTrait;
#[ORM\ManyToOne(targetEntity: Calendar::class, inversedBy: 'documents')] #[ORM\ManyToOne(targetEntity: Calendar::class, inversedBy: 'documents')]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private Calendar $calendar; private Calendar $calendar;
@ -37,7 +35,6 @@ class CalendarDoc implements TrackCreationInterface, TrackUpdateInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: false, options: ['default' => 0])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: false, options: ['default' => 0])]
private int $datetimeVersion = 0; private int $datetimeVersion = 0;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -46,11 +43,12 @@ class CalendarDoc implements TrackCreationInterface, TrackUpdateInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: false, options: ['default' => false])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: false, options: ['default' => false])]
private bool $trackDateTimeVersion = false; private bool $trackDateTimeVersion = false;
public function __construct(Calendar $calendar, public function __construct(
Calendar $calendar,
#[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])] #[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private ?StoredObject $storedObject) private ?StoredObject $storedObject
{ ) {
$this->setCalendar($calendar); $this->setCalendar($calendar);
$this->datetimeVersion = $calendar->getDateTimeVersion(); $this->datetimeVersion = $calendar->getDateTimeVersion();
} }

View File

@ -21,7 +21,6 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups; use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_calendar.calendar_range')] #[ORM\Table(name: 'chill_calendar.calendar_range')]
#[ORM\UniqueConstraint(name: 'idx_calendar_range_remote', columns: ['remoteId'], options: ['where' => "remoteId <> ''"])] #[ORM\UniqueConstraint(name: 'idx_calendar_range_remote', columns: ['remoteId'], options: ['where' => "remoteId <> ''"])]
@ -41,14 +40,12 @@ class CalendarRange implements TrackCreationInterface, TrackUpdateInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: false)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: false)]
private ?\DateTimeImmutable $endDate = null; private ?\DateTimeImmutable $endDate = null;
#[Groups(['read'])] #[Groups(['read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null; private ?int $id = null;
#[Groups(['read', 'write', 'calendar:read'])] #[Groups(['read', 'write', 'calendar:read'])]
#[Assert\NotNull] #[Assert\NotNull]
#[ORM\ManyToOne(targetEntity: Location::class)] #[ORM\ManyToOne(targetEntity: Location::class)]
@ -62,7 +59,7 @@ class CalendarRange implements TrackCreationInterface, TrackUpdateInterface
#[Groups(['read', 'write', 'calendar:read'])] #[Groups(['read', 'write', 'calendar:read'])]
#[Assert\NotNull] #[Assert\NotNull]
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
private ?User $user = null; private ?User $user = null;
public function getCalendar(): ?Calendar public function getCalendar(): ?Calendar

View File

@ -14,7 +14,6 @@ namespace Chill\CalendarBundle\Entity;
use Chill\CalendarBundle\Repository\CancelReasonRepository; use Chill\CalendarBundle\Repository\CancelReasonRepository;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: CancelReasonRepository::class)] #[ORM\Entity(repositoryClass: CancelReasonRepository::class)]
#[ORM\Table(name: 'chill_calendar.cancel_reason')] #[ORM\Table(name: 'chill_calendar.cancel_reason')]
class CancelReason class CancelReason
@ -31,7 +30,6 @@ class CancelReason
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255)]
private ?string $canceledBy = null; private ?string $canceledBy = null;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]

View File

@ -24,8 +24,6 @@ use Symfony\Component\Serializer\Annotation as Serializer;
* *
* The event/calendar in the user may have a different id than the mainUser. We add then fields to store the * The event/calendar in the user may have a different id than the mainUser. We add then fields to store the
* remote id of this event in the remote calendar. * remote id of this event in the remote calendar.
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_calendar.invite')] #[ORM\Table(name: 'chill_calendar.invite')]
@ -59,7 +57,6 @@ class Invite implements TrackUpdateInterface, TrackCreationInterface
#[ORM\ManyToOne(targetEntity: Calendar::class, inversedBy: 'invites')] #[ORM\ManyToOne(targetEntity: Calendar::class, inversedBy: 'invites')]
private ?Calendar $calendar = null; private ?Calendar $calendar = null;
#[Serializer\Groups(groups: ['calendar:read', 'read'])] #[Serializer\Groups(groups: ['calendar:read', 'read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
@ -70,9 +67,8 @@ class Invite implements TrackUpdateInterface, TrackCreationInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false, options: ['default' => 'pending'])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false, options: ['default' => 'pending'])]
private string $status = self::PENDING; private string $status = self::PENDING;
#[Serializer\Groups(groups: ['calendar:read', 'read', 'docgen:read'])] #[Serializer\Groups(groups: ['calendar:read', 'read', 'docgen:read'])]
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private ?User $user = null; private ?User $user = null;

View File

@ -15,9 +15,6 @@ use Doctrine\ORM\Mapping as ORM;
/** /**
* CustomField. * CustomField.
*
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
@ -31,10 +28,9 @@ class CustomField
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
private bool $active = true; private bool $active = true;
#[ORM\ManyToOne(targetEntity: \Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class, inversedBy: 'customFields')] #[ORM\ManyToOne(targetEntity: CustomFieldsGroup::class, inversedBy: 'customFields')]
private ?CustomFieldsGroup $customFieldGroup = null; private ?CustomFieldsGroup $customFieldGroup = null;
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]

View File

@ -15,7 +15,6 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: \Chill\CustomFieldsBundle\EntityRepository\CustomFieldLongChoice\OptionRepository::class)] #[ORM\Entity(repositoryClass: \Chill\CustomFieldsBundle\EntityRepository\CustomFieldLongChoice\OptionRepository::class)]
#[ORM\Table(name: 'custom_field_long_choice_options')] #[ORM\Table(name: 'custom_field_long_choice_options')]
class Option class Option
@ -26,10 +25,9 @@ class Option
/** /**
* @var Collection<Option> * @var Collection<Option>
*/ */
#[ORM\OneToMany(targetEntity: \Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option::class, mappedBy: 'parent')] #[ORM\OneToMany(targetEntity: Option::class, mappedBy: 'parent')]
private Collection $children; private Collection $children;
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]
@ -41,8 +39,7 @@ class Option
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 15)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 15)]
private ?string $key = null; private ?string $key = null;
#[ORM\ManyToOne(targetEntity: Option::class, inversedBy: 'children')]
#[ORM\ManyToOne(targetEntity: \Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option::class, inversedBy: 'children')]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?Option $parent = null; private ?Option $parent = null;

View File

@ -15,21 +15,18 @@ use Doctrine\ORM\Mapping as ORM;
/** /**
* CustomFieldsDefaultGroup. * CustomFieldsDefaultGroup.
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'customfieldsdefaultgroup')] #[ORM\Table(name: 'customfieldsdefaultgroup')]
#[ORM\UniqueConstraint(name: 'unique_entity', columns: ['entity'])] #[ORM\UniqueConstraint(name: 'unique_entity', columns: ['entity'])]
class CustomFieldsDefaultGroup class CustomFieldsDefaultGroup
{ {
#[ORM\ManyToOne(targetEntity: \Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)] // sf4 check: option inversedBy="customFields" return inconsistent error mapping !! #[ORM\ManyToOne(targetEntity: CustomFieldsGroup::class)] // sf4 check: option inversedBy="customFields" return inconsistent error mapping !!
private ?CustomFieldsGroup $customFieldsGroup = null; private ?CustomFieldsGroup $customFieldsGroup = null;
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255)]
private ?string $entity = null; private ?string $entity = null;
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]

View File

@ -13,12 +13,11 @@ namespace Chill\CustomFieldsBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\Order;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
/** /**
* CustomFieldGroup. * CustomFieldGroup.
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'customfieldsgroup')] #[ORM\Table(name: 'customfieldsgroup')]
@ -35,17 +34,14 @@ class CustomFieldsGroup
* The custom fields are asc-ordered regarding to their property "ordering". * The custom fields are asc-ordered regarding to their property "ordering".
* *
* @var Collection<CustomField> * @var Collection<CustomField>
*
*
*/ */
#[ORM\OneToMany(targetEntity: \Chill\CustomFieldsBundle\Entity\CustomField::class, mappedBy: 'customFieldGroup')] #[ORM\OneToMany(targetEntity: CustomField::class, mappedBy: 'customFieldGroup')]
#[ORM\OrderBy(['ordering' => \Doctrine\Common\Collections\Criteria::ASC])] #[ORM\OrderBy(['ordering' => 'ASC'])]
private Collection $customFields; private Collection $customFields;
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255)]
private ?string $entity = null; private ?string $entity = null;
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]

View File

@ -15,7 +15,6 @@ use Chill\DocStoreBundle\Entity\StoredObject;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['docgen_template' => DocGeneratorTemplate::class])] #[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['docgen_template' => DocGeneratorTemplate::class])]
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_docgen_template')] #[ORM\Table(name: 'chill_docgen_template')]
@ -46,7 +45,6 @@ class DocGeneratorTemplate
#[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])] #[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
private ?StoredObject $file = null; private ?StoredObject $file = null;
#[Serializer\Groups(['read'])] #[Serializer\Groups(['read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]

View File

@ -16,17 +16,14 @@ use Chill\MainBundle\Entity\HasScopesInterface;
use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table('chill_doc.accompanyingcourse_document')] #[ORM\Table('chill_doc.accompanyingcourse_document')]
class AccompanyingCourseDocument extends Document implements HasScopesInterface, HasCentersInterface class AccompanyingCourseDocument extends Document implements HasScopesInterface, HasCentersInterface
{ {
#[ORM\ManyToOne(targetEntity: AccompanyingPeriod::class)] #[ORM\ManyToOne(targetEntity: AccompanyingPeriod::class)]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private ?AccompanyingPeriod $course = null; private ?AccompanyingPeriod $course = null;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]

View File

@ -26,8 +26,7 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
use TrackUpdateTrait; use TrackUpdateTrait;
#[ORM\ManyToOne(targetEntity: DocumentCategory::class)]
#[ORM\ManyToOne(targetEntity: \Chill\DocStoreBundle\Entity\DocumentCategory::class)]
#[ORM\JoinColumn(name: 'category_bundle_id', referencedColumnName: 'bundle_id')] #[ORM\JoinColumn(name: 'category_bundle_id', referencedColumnName: 'bundle_id')]
#[ORM\JoinColumn(name: 'category_id_inside_bundle', referencedColumnName: 'id_inside_bundle')] #[ORM\JoinColumn(name: 'category_id_inside_bundle', referencedColumnName: 'id_inside_bundle')]
private ?DocumentCategory $category = null; private ?DocumentCategory $category = null;
@ -40,10 +39,10 @@ class Document implements TrackCreationInterface, TrackUpdateInterface
#[Assert\Valid] #[Assert\Valid]
#[Assert\NotNull(message: 'Upload a document')] #[Assert\NotNull(message: 'Upload a document')]
#[ORM\ManyToOne(targetEntity: \Chill\DocStoreBundle\Entity\StoredObject::class, cascade: ['persist'])] #[ORM\ManyToOne(targetEntity: StoredObject::class, cascade: ['persist'])]
private ?StoredObject $object = null; private ?StoredObject $object = null;
#[ORM\ManyToOne(targetEntity: \Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate::class)] #[ORM\ManyToOne(targetEntity: DocGeneratorTemplate::class)]
private ?DocGeneratorTemplate $template = null; private ?DocGeneratorTemplate $template = null;
#[Assert\Length(min: 2, max: 250)] #[Assert\Length(min: 2, max: 250)]

View File

@ -13,7 +13,6 @@ namespace Chill\DocStoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table('chill_doc.document_category')] #[ORM\Table('chill_doc.document_category')]
class DocumentCategory class DocumentCategory
@ -33,16 +32,12 @@ class DocumentCategory
*/ */
public function __construct( public function __construct(
/** /**
*
*
* @var string The id of the bundle that has create the category (i.e. 'person', 'activity', ....) * @var string The id of the bundle that has create the category (i.e. 'person', 'activity', ....)
*/ */
#[ORM\Id] #[ORM\Id]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, name: 'bundle_id')] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, name: 'bundle_id')]
private $bundleId, private $bundleId,
/** /**
*
*
* @var int The id which is unique inside the bundle * @var int The id which is unique inside the bundle
*/ */
#[ORM\Id] #[ORM\Id]

View File

@ -17,24 +17,22 @@ use Chill\MainBundle\Entity\Scope;
use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\Person;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table('chill_doc.person_document')] #[ORM\Table('chill_doc.person_document')]
class PersonDocument extends Document implements HasCenterInterface, HasScopeInterface class PersonDocument extends Document implements HasCenterInterface, HasScopeInterface
{ {
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null; private ?int $id = null;
#[ORM\ManyToOne(targetEntity: \Chill\PersonBundle\Entity\Person::class)] #[ORM\ManyToOne(targetEntity: Person::class)]
private Person $person; private Person $person;
/** /**
* @var Scope The document's center * @var Scope The document's center
*/ */
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Scope::class)] #[ORM\ManyToOne(targetEntity: Scope::class)]
private ?Scope $scope = null; private ?Scope $scope = null;
public function getCenter() public function getCenter()

View File

@ -29,8 +29,6 @@ use Symfony\Component\Serializer\Annotation as Serializer;
* The property `$deleteAt` allow a deletion of the document after the given date. But this property should * The property `$deleteAt` allow a deletion of the document after the given date. But this property should
* be set before the document is actually written by the StoredObjectManager. * be set before the document is actually written by the StoredObjectManager.
* *
*
*
* @AsyncFileExists( * @AsyncFileExists(
* message="The file is not stored properly" * message="The file is not stored properly"
* ) * )
@ -52,7 +50,6 @@ class StoredObject implements Document, TrackCreationInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT)]
private string $filename = ''; private string $filename = '';
#[Serializer\Groups(['read', 'write'])] #[Serializer\Groups(['read', 'write'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
@ -103,7 +100,8 @@ class StoredObject implements Document, TrackCreationInterface
/** /**
* @param StoredObject::STATUS_* $status * @param StoredObject::STATUS_* $status
*/ */
public function __construct(#[Serializer\Groups(['read'])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, options: ['default' => 'ready'])] public function __construct(
#[Serializer\Groups(['read'])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, options: ['default' => 'ready'])]
private string $status = 'ready' private string $status = 'ready'
) { ) {
$this->uuid = Uuid::uuid4(); $this->uuid = Uuid::uuid4();

View File

@ -62,7 +62,7 @@ final class EventController extends AbstractController
) {} ) {}
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/delete', name: 'chill_event__event_delete', requirements: ['event_id' => '\d+'], methods: ['GET', 'DELETE'])] #[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/delete', name: 'chill_event__event_delete', requirements: ['event_id' => '\d+'], methods: ['GET', 'DELETE'])]
public function deleteAction($event_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response public function deleteAction($event_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|Response
{ {
$em = $this->managerRegistry->getManager(); $em = $this->managerRegistry->getManager();
$event = $em->getRepository(Event::class)->findOneBy([ $event = $em->getRepository(Event::class)->findOneBy([
@ -110,7 +110,6 @@ final class EventController extends AbstractController
/** /**
* Displays a form to edit an existing Event entity. * Displays a form to edit an existing Event entity.
*
*/ */
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/edit', name: 'chill_event__event_edit')] #[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/edit', name: 'chill_event__event_edit')]
public function editAction($event_id): Response public function editAction($event_id): Response
@ -134,8 +133,6 @@ final class EventController extends AbstractController
/** /**
* List events subscriptions for a person. * List events subscriptions for a person.
* *
* @return \Symfony\Component\HttpFoundation\Response
*
* @throws \Doctrine\ORM\NonUniqueResultException * @throws \Doctrine\ORM\NonUniqueResultException
*/ */
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{person_id}/list', name: 'chill_event__list_by_person', methods: ['GET'])] #[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{person_id}/list', name: 'chill_event__list_by_person', methods: ['GET'])]
@ -281,10 +278,9 @@ final class EventController extends AbstractController
* *
* @ParamConverter("event", options={"id": "event_id"}) * @ParamConverter("event", options={"id": "event_id"})
* *
* @return \Symfony\Component\HttpFoundation\Response * @return Response
* *
* @throws \PhpOffice\PhpSpreadsheet\Exception * @throws \PhpOffice\PhpSpreadsheet\Exception
*
*/ */
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/show', name: 'chill_event__event_show')] #[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/show', name: 'chill_event__event_show')]
public function showAction(Event $event, Request $request) public function showAction(Event $event, Request $request)
@ -318,7 +314,7 @@ final class EventController extends AbstractController
* Edits an existing Event entity. * Edits an existing Event entity.
*/ */
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/update', name: 'chill_event__event_update', methods: ['POST', 'PUT'])] #[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/event/{event_id}/update', name: 'chill_event__event_update', methods: ['POST', 'PUT'])]
public function updateAction(Request $request, $event_id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response public function updateAction(Request $request, $event_id): \Symfony\Component\HttpFoundation\RedirectResponse|Response
{ {
$em = $this->managerRegistry->getManager(); $em = $this->managerRegistry->getManager();

View File

@ -289,7 +289,6 @@ final class ParticipationController extends AbstractController
* *
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException if the participation is not found * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException if the participation is not found
* @throws \Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException if the user is not allowed to edit the participation * @throws \Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException if the user is not allowed to edit the participation
*
*/ */
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/participation/{participation_id}/edit', name: 'chill_event_participation_edit')] #[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/participation/{participation_id}/edit', name: 'chill_event_participation_edit')]
public function editAction(int $participation_id): Response public function editAction(int $participation_id): Response
@ -321,7 +320,6 @@ final class ParticipationController extends AbstractController
* show a form to edit multiple participation for the same event. * show a form to edit multiple participation for the same event.
* *
* @param int $event_id * @param int $event_id
*
*/ */
#[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/participation/{event_id}/edit_multiple', name: 'chill_event_participation_edit_multiple')] #[\Symfony\Component\Routing\Annotation\Route(path: '/{_locale}/event/participation/{event_id}/edit_multiple', name: 'chill_event_participation_edit_multiple')]
public function editMultipleAction($event_id): Response|\Symfony\Component\HttpFoundation\RedirectResponse public function editMultipleAction($event_id): Response|\Symfony\Component\HttpFoundation\RedirectResponse

View File

@ -23,7 +23,6 @@ use Chill\MainBundle\Entity\HasScopeInterface;
use Chill\MainBundle\Entity\Location; use Chill\MainBundle\Entity\Location;
use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Entity\User; use Chill\MainBundle\Entity\User;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
@ -31,9 +30,6 @@ use Symfony\Component\Validator\Constraints as Assert;
/** /**
* Class Event. * Class Event.
*
*
*
*/ */
#[ORM\Entity(repositoryClass: \Chill\EventBundle\Repository\EventRepository::class)] #[ORM\Entity(repositoryClass: \Chill\EventBundle\Repository\EventRepository::class)]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
@ -44,22 +40,21 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
use TrackUpdateTrait; use TrackUpdateTrait;
#[Assert\NotNull] #[Assert\NotNull]
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Center::class)] // A #[ORM\ManyToOne(targetEntity: Center::class)] // A
private ?Center $center = null; private ?Center $center = null;
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Scope::class)] #[ORM\ManyToOne(targetEntity: Scope::class)]
private ?Scope $circle = null; private ?Scope $circle = null;
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE)]
private ?\DateTime $date; private ?\DateTime $date;
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]
private ?int $id = null; private ?int $id = null;
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
private ?User $moderator = null; private ?User $moderator = null;
#[Assert\NotBlank] #[Assert\NotBlank]
@ -69,25 +64,22 @@ class Event implements HasCenterInterface, HasScopeInterface, TrackCreationInter
/** /**
* @var Collection<Participation> * @var Collection<Participation>
*/ */
#[ORM\OneToMany(targetEntity: \Chill\EventBundle\Entity\Participation::class, mappedBy: 'event')] #[ORM\OneToMany(targetEntity: Participation::class, mappedBy: 'event')]
private Collection $participations; private Collection $participations;
#[Assert\NotNull] #[Assert\NotNull]
#[ORM\ManyToOne(targetEntity: \Chill\EventBundle\Entity\EventType::class)] #[ORM\ManyToOne(targetEntity: EventType::class)]
private ?EventType $type = null; private ?EventType $type = null;
#[ORM\Embedded(class: CommentEmbeddable::class, columnPrefix: 'comment_')] #[ORM\Embedded(class: CommentEmbeddable::class, columnPrefix: 'comment_')]
private CommentEmbeddable $comment; private CommentEmbeddable $comment;
#[ORM\ManyToOne(targetEntity: Location::class)] #[ORM\ManyToOne(targetEntity: Location::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?Location $location = null; private ?Location $location = null;
/** /**
* @var Collection<StoredObject> * @var Collection<StoredObject>
*
*
*/ */
#[ORM\ManyToMany(targetEntity: StoredObject::class, cascade: ['persist', 'refresh'])] #[ORM\ManyToMany(targetEntity: StoredObject::class, cascade: ['persist', 'refresh'])]
#[ORM\JoinTable('chill_event_event_documents')] #[ORM\JoinTable('chill_event_event_documents')]

View File

@ -17,9 +17,6 @@ use Doctrine\ORM\Mapping as ORM;
/** /**
* Class EventType. * Class EventType.
*
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
@ -29,7 +26,6 @@ class EventType
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: false)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: false)]
private bool $active = true; private bool $active = true;
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]
@ -44,13 +40,13 @@ class EventType
/** /**
* @var Collection<Role> * @var Collection<Role>
*/ */
#[ORM\OneToMany(targetEntity: \Chill\EventBundle\Entity\Role::class, mappedBy: 'type')] #[ORM\OneToMany(targetEntity: Role::class, mappedBy: 'type')]
private Collection $roles; private Collection $roles;
/** /**
* @var Collection<Status> * @var Collection<Status>
*/ */
#[ORM\OneToMany(targetEntity: \Chill\EventBundle\Entity\Status::class, mappedBy: 'type')] #[ORM\OneToMany(targetEntity: Status::class, mappedBy: 'type')]
private Collection $statuses; private Collection $statuses;
/** /**

View File

@ -26,9 +26,6 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
/** /**
* Class Participation. * Class Participation.
*
*
*
*/ */
#[UniqueEntity(['event', 'person'], message: 'event.validation.person_already_participate_to_event')] #[UniqueEntity(['event', 'person'], message: 'event.validation.person_already_participate_to_event')]
#[ORM\Entity(repositoryClass: \Chill\EventBundle\Repository\ParticipationRepository::class)] #[ORM\Entity(repositoryClass: \Chill\EventBundle\Repository\ParticipationRepository::class)]
@ -42,24 +39,23 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa
use TrackCreationTrait; use TrackCreationTrait;
use TrackUpdateTrait; use TrackUpdateTrait;
#[ORM\ManyToOne(targetEntity: \Chill\EventBundle\Entity\Event::class, inversedBy: 'participations')] #[ORM\ManyToOne(targetEntity: Event::class, inversedBy: 'participations')]
private ?Event $event = null; private ?Event $event = null;
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]
private ?int $id = null; private ?int $id = null;
#[Assert\NotNull] #[Assert\NotNull]
#[ORM\ManyToOne(targetEntity: \Chill\PersonBundle\Entity\Person::class)] #[ORM\ManyToOne(targetEntity: Person::class)]
private ?Person $person = null; private ?Person $person = null;
#[ORM\ManyToOne(targetEntity: \Chill\EventBundle\Entity\Role::class)] #[ORM\ManyToOne(targetEntity: Role::class)]
private ?Role $role = null; private ?Role $role = null;
#[Assert\NotNull] #[Assert\NotNull]
#[ORM\ManyToOne(targetEntity: \Chill\EventBundle\Entity\Status::class)] #[ORM\ManyToOne(targetEntity: Status::class)]
private ?Status $status = null; private ?Status $status = null;
public function getCenter() public function getCenter()

View File

@ -15,9 +15,6 @@ use Doctrine\ORM\Mapping as ORM;
/** /**
* Class Role. * Class Role.
*
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
@ -27,7 +24,6 @@ class Role
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: false)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: false)]
private bool $active = true; private bool $active = true;
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]
@ -39,7 +35,7 @@ class Role
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
private $name; private $name;
#[ORM\ManyToOne(targetEntity: \Chill\EventBundle\Entity\EventType::class, inversedBy: 'roles')] #[ORM\ManyToOne(targetEntity: EventType::class, inversedBy: 'roles')]
private ?EventType $type = null; private ?EventType $type = null;
/** /**

View File

@ -15,9 +15,6 @@ use Doctrine\ORM\Mapping as ORM;
/** /**
* Class Status. * Class Status.
*
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
@ -27,7 +24,6 @@ class Status
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: false)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: false)]
private bool $active = true; private bool $active = true;
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]
@ -39,7 +35,7 @@ class Status
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
private $name; private $name;
#[ORM\ManyToOne(targetEntity: \Chill\EventBundle\Entity\EventType::class, inversedBy: 'statuses')] #[ORM\ManyToOne(targetEntity: EventType::class, inversedBy: 'statuses')]
private ?EventType $type = null; private ?EventType $type = null;
/** /**

View File

@ -105,8 +105,6 @@ class ExportController extends AbstractController
* This action must work with GET queries. * This action must work with GET queries.
* *
* @param string $alias * @param string $alias
*
*
*/ */
#[Route(path: '/{_locale}/exports/generate/{alias}', name: 'chill_main_export_generate', methods: ['GET'])] #[Route(path: '/{_locale}/exports/generate/{alias}', name: 'chill_main_export_generate', methods: ['GET'])]
public function generateAction(Request $request, $alias): Response public function generateAction(Request $request, $alias): Response

View File

@ -33,9 +33,6 @@ class LoginController extends AbstractController
/** /**
* Show a login form. * Show a login form.
*
* @return Response
*
*/ */
#[\Symfony\Component\Routing\Annotation\Route(path: '/login', name: 'login')] #[\Symfony\Component\Routing\Annotation\Route(path: '/login', name: 'login')]
public function loginAction(Request $request): Response public function loginAction(Request $request): Response

View File

@ -116,7 +116,6 @@ final class PasswordController extends AbstractController
/** /**
* @throws \Doctrine\ORM\NoResultException * @throws \Doctrine\ORM\NoResultException
* @throws \Doctrine\ORM\NonUniqueResultException * @throws \Doctrine\ORM\NonUniqueResultException
*
*/ */
#[Route(path: '/public/{_locale}/password/request-recover', name: 'password_request_recover')] #[Route(path: '/public/{_locale}/password/request-recover', name: 'password_request_recover')]
public function requestRecoverAction(Request $request): Response|\Symfony\Component\HttpFoundation\RedirectResponse public function requestRecoverAction(Request $request): Response|\Symfony\Component\HttpFoundation\RedirectResponse

View File

@ -12,7 +12,6 @@ declare(strict_types=1);
namespace Chill\MainBundle\Doctrine\Model; namespace Chill\MainBundle\Doctrine\Model;
use Chill\MainBundle\Entity\User; use Chill\MainBundle\Entity\User;
use DateTime;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
@ -22,7 +21,6 @@ trait TrackCreationTrait
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true, options: ['default' => null])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true, options: ['default' => null])]
private ?\DateTimeImmutable $createdAt = null; private ?\DateTimeImmutable $createdAt = null;
#[Serializer\Groups(['read'])] #[Serializer\Groups(['read'])]
#[ORM\ManyToOne(targetEntity: User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]

View File

@ -12,7 +12,6 @@ declare(strict_types=1);
namespace Chill\MainBundle\Doctrine\Model; namespace Chill\MainBundle\Doctrine\Model;
use Chill\MainBundle\Entity\User; use Chill\MainBundle\Entity\User;
use DateTime;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
@ -22,7 +21,6 @@ trait TrackUpdateTrait
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true, options: ['default' => null])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true, options: ['default' => null])]
private ?\DateTimeImmutable $updatedAt = null; private ?\DateTimeImmutable $updatedAt = null;
#[Serializer\Groups(['read'])] #[Serializer\Groups(['read'])]
#[ORM\ManyToOne(targetEntity: User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]

View File

@ -17,7 +17,6 @@ use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface; use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait; use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
use Chill\ThirdPartyBundle\Entity\ThirdParty; use Chill\ThirdPartyBundle\Entity\ThirdParty;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
@ -26,9 +25,6 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
/** /**
* Address. * Address.
*
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
@ -99,17 +95,12 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
* @var Collection<GeographicalUnit> * @var Collection<GeographicalUnit>
* *
* @readonly * @readonly
*
*
*/ */
#[ORM\ManyToMany(targetEntity: GeographicalUnit::class)] #[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')])] #[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; private Collection $geographicalUnits;
/** /**
*
*
*
* @readonly * @readonly
*/ */
#[Groups(['write'])] #[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. * A ThirdParty reference for person's addresses that are linked to a third party.
*
*
*/ */
#[Groups(['write'])] #[Groups(['write'])]
#[ORM\ManyToOne(targetEntity: \Chill\ThirdPartyBundle\Entity\ThirdParty::class)] #[ORM\ManyToOne(targetEntity: ThirdParty::class)]
#[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')] #[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')]
private ?ThirdParty $linkedToThirdParty = null; private ?ThirdParty $linkedToThirdParty = null;
@ -142,9 +131,8 @@ class Address implements TrackCreationInterface, TrackUpdateInterface
#[ORM\Column(type: 'point', nullable: true)] #[ORM\Column(type: 'point', nullable: true)]
private ?Point $point = null; private ?Point $point = null;
#[Groups(['write'])] #[Groups(['write'])]
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\PostalCode::class)] #[ORM\ManyToOne(targetEntity: PostalCode::class)]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private ?PostalCode $postcode = null; private ?PostalCode $postcode = null;

View File

@ -15,7 +15,6 @@ use Chill\MainBundle\Doctrine\Model\Point;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups; use Symfony\Component\Serializer\Annotation\Groups;
#[ORM\Entity] #[ORM\Entity]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
#[ORM\Table(name: 'chill_main_address_reference')] #[ORM\Table(name: 'chill_main_address_reference')]
@ -39,7 +38,6 @@ class AddressReference
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $deletedAt = null; private ?\DateTimeImmutable $deletedAt = null;
#[Groups(['read'])] #[Groups(['read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
@ -58,7 +56,7 @@ class AddressReference
private ?Point $point = null; private ?Point $point = null;
#[Groups(['read'])] #[Groups(['read'])]
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\PostalCode::class)] #[ORM\ManyToOne(targetEntity: PostalCode::class)]
private ?PostalCode $postcode = null; private ?PostalCode $postcode = null;
#[Groups(['read'])] #[Groups(['read'])]

View File

@ -16,7 +16,6 @@ use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'centers')] #[ORM\Table(name: 'centers')]
class Center implements HasCenterInterface, \Stringable class Center implements HasCenterInterface, \Stringable
@ -24,10 +23,9 @@ class Center implements HasCenterInterface, \Stringable
/** /**
* @var Collection<GroupCenter> * @var Collection<GroupCenter>
*/ */
#[ORM\OneToMany(targetEntity: \Chill\MainBundle\Entity\GroupCenter::class, mappedBy: 'center')] #[ORM\OneToMany(targetEntity: GroupCenter::class, mappedBy: 'center')]
private Collection $groupCenters; private Collection $groupCenters;
#[Serializer\Groups(['docgen:read'])] #[Serializer\Groups(['docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]

View File

@ -14,7 +14,6 @@ namespace Chill\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['chill_main_civility' => Civility::class])] #[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['chill_main_civility' => Civility::class])]
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_main_civility')] #[ORM\Table(name: 'chill_main_civility')]
@ -29,7 +28,6 @@ class Civility
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
private bool $active = true; private bool $active = true;
#[Serializer\Groups(['read', 'docgen:read'])] #[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]

View File

@ -17,10 +17,6 @@ use Symfony\Component\Serializer\Annotation\Groups;
/** /**
* Country. * Country.
*
*
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\Cache(usage: 'READ_ONLY', region: 'country_cache_region')] #[ORM\Cache(usage: 'READ_ONLY', region: 'country_cache_region')]
@ -33,7 +29,6 @@ class Country
#[Context(['is-translatable' => true], groups: ['docgen:read'])] #[Context(['is-translatable' => true], groups: ['docgen:read'])]
private string $countryCode = ''; private string $countryCode = '';
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -42,7 +37,6 @@ class Country
/** /**
* @var array<string, string> * @var array<string, string>
*
*/ */
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]

View File

@ -13,7 +13,6 @@ namespace Chill\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_main_cronjob_execution')] #[ORM\Table(name: 'chill_main_cronjob_execution')]
class CronJobExecution class CronJobExecution

View File

@ -15,12 +15,10 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_main_dashboard_config_item')] #[ORM\Table(name: 'chill_main_dashboard_config_item')]
class DashboardConfigItem class DashboardConfigItem
{ {
#[Serializer\Groups(['dashboardConfigItem:read', 'read'])] #[Serializer\Groups(['dashboardConfigItem:read', 'read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]

View File

@ -11,7 +11,6 @@ declare(strict_types=1);
namespace Chill\MainBundle\Entity\Embeddable; namespace Chill\MainBundle\Entity\Embeddable;
use DateTime;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Embeddable] #[ORM\Embeddable]

View File

@ -13,7 +13,6 @@ namespace Chill\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(readOnly: true)] #[ORM\Entity(readOnly: true)]
#[ORM\Table(name: 'chill_main_geographical_unit')] #[ORM\Table(name: 'chill_main_geographical_unit')]
#[ORM\UniqueConstraint(name: 'geographical_unit_refid', columns: ['layer_id', 'unitRefId'])] #[ORM\UniqueConstraint(name: 'geographical_unit_refid', columns: ['layer_id', 'unitRefId'])]
@ -22,7 +21,6 @@ class GeographicalUnit
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
private string $geom; private string $geom;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]

View File

@ -16,13 +16,11 @@ use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_main_geographical_unit_layer')] #[ORM\Table(name: 'chill_main_geographical_unit_layer')]
#[ORM\UniqueConstraint(name: 'geographical_unit_layer_refid', columns: ['refId'])] #[ORM\UniqueConstraint(name: 'geographical_unit_layer_refid', columns: ['refId'])]
class GeographicalUnitLayer class GeographicalUnitLayer
{ {
#[Serializer\Groups(['read'])] #[Serializer\Groups(['read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]

View File

@ -15,32 +15,28 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE', region: 'acl_cache_region')] #[ORM\Cache(usage: 'NONSTRICT_READ_WRITE', region: 'acl_cache_region')]
#[ORM\Table(name: 'group_centers')] #[ORM\Table(name: 'group_centers')]
class GroupCenter class GroupCenter
{ {
#[ORM\ManyToOne(targetEntity: Center::class, inversedBy: 'groupCenters')]
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Center::class, inversedBy: 'groupCenters')]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')] #[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')]
private ?Center $center = null; private ?Center $center = null;
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]
private ?int $id = null; private ?int $id = null;
#[ORM\ManyToOne(targetEntity: PermissionsGroup::class, inversedBy: 'groupCenters')]
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\PermissionsGroup::class, inversedBy: 'groupCenters')]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')] #[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')]
private ?PermissionsGroup $permissionsGroup = null; private ?PermissionsGroup $permissionsGroup = null;
/** /**
* @var Collection<User::class> * @var Collection<User::class>
*/ */
#[ORM\ManyToMany(targetEntity: \Chill\MainBundle\Entity\User::class, mappedBy: 'groupCenters')] #[ORM\ManyToMany(targetEntity: User::class, mappedBy: 'groupCenters')]
private Collection $users; private Collection $users;
/** /**

View File

@ -16,10 +16,6 @@ use Symfony\Component\Serializer\Annotation as Serializer;
/** /**
* Language. * Language.
*
*
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\Cache(usage: 'READ_ONLY', region: 'language_cache_region')] #[ORM\Cache(usage: 'READ_ONLY', region: 'language_cache_region')]
@ -27,7 +23,6 @@ use Symfony\Component\Serializer\Annotation as Serializer;
#[ORM\Table(name: 'language')] #[ORM\Table(name: 'language')]
class Language class Language
{ {
#[Serializer\Groups(['docgen:read'])] #[Serializer\Groups(['docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING)]
@ -35,7 +30,6 @@ class Language
/** /**
* @var string array * @var string array
*
*/ */
#[Serializer\Groups(['docgen:read'])] #[Serializer\Groups(['docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]

View File

@ -20,7 +20,6 @@ use libphonenumber\PhoneNumber;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap; use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
#[DiscriminatorMap(typeProperty: 'type', mapping: ['location' => Location::class])] #[DiscriminatorMap(typeProperty: 'type', mapping: ['location' => Location::class])]
#[ORM\Entity(repositoryClass: LocationRepository::class)] #[ORM\Entity(repositoryClass: LocationRepository::class)]
#[ORM\Table(name: 'chill_main_location')] #[ORM\Table(name: 'chill_main_location')]
@ -30,7 +29,6 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: true)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: true)]
private bool $active = true; private bool $active = true;
#[Serializer\Groups(['read', 'write', 'docgen:read'])] #[Serializer\Groups(['read', 'write', 'docgen:read'])]
#[ORM\ManyToOne(targetEntity: Address::class, cascade: ['persist'])] #[ORM\ManyToOne(targetEntity: Address::class, cascade: ['persist'])]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
@ -52,14 +50,12 @@ class Location implements TrackCreationInterface, TrackUpdateInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255, nullable: true)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255, nullable: true)]
private ?string $email = null; private ?string $email = null;
#[Serializer\Groups(['read', 'docgen:read'])] #[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[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\Groups(['read', 'write', 'docgen:read'])] #[Serializer\Groups(['read', 'write', 'docgen:read'])]
#[ORM\ManyToOne(targetEntity: LocationType::class)] #[ORM\ManyToOne(targetEntity: LocationType::class)]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]

View File

@ -17,7 +17,6 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap; use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
#[DiscriminatorMap(typeProperty: 'type', mapping: ['location-type' => LocationType::class])] #[DiscriminatorMap(typeProperty: 'type', mapping: ['location-type' => LocationType::class])]
#[UniqueEntity(['defaultFor'])] #[UniqueEntity(['defaultFor'])]
#[ORM\Entity(repositoryClass: LocationTypeRepository::class)] #[ORM\Entity(repositoryClass: LocationTypeRepository::class)]
@ -58,7 +57,6 @@ class LocationType
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
private bool $editableByUsers = true; private bool $editableByUsers = true;
#[Serializer\Groups(['read', 'docgen:read'])] #[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]

View File

@ -19,7 +19,6 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups; use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_main_news')] #[ORM\Table(name: 'chill_main_news')]
class NewsItem implements TrackCreationInterface, TrackUpdateInterface class NewsItem implements TrackCreationInterface, TrackUpdateInterface
@ -28,7 +27,6 @@ class NewsItem implements TrackCreationInterface, TrackUpdateInterface
use TrackUpdateTrait; use TrackUpdateTrait;
#[Groups(['read'])] #[Groups(['read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]

View File

@ -14,11 +14,11 @@ namespace Chill\MainBundle\Entity;
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface; use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\Order;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface;
#[ORM\Entity] #[ORM\Entity]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
#[ORM\Table(name: 'chill_main_notification')] #[ORM\Table(name: 'chill_main_notification')]
@ -32,8 +32,6 @@ class Notification implements TrackUpdateInterface
/** /**
* @var Collection<User> * @var Collection<User>
*
*
*/ */
#[ORM\ManyToMany(targetEntity: User::class)] #[ORM\ManyToMany(targetEntity: User::class)]
#[ORM\JoinTable(name: 'chill_main_notification_addresses_user')] #[ORM\JoinTable(name: 'chill_main_notification_addresses_user')]
@ -58,17 +56,14 @@ class Notification implements TrackUpdateInterface
/** /**
* @var Collection<NotificationComment> * @var Collection<NotificationComment>
*
*
*/ */
#[ORM\OneToMany(targetEntity: NotificationComment::class, mappedBy: 'notification', orphanRemoval: true)] #[ORM\OneToMany(targetEntity: NotificationComment::class, mappedBy: 'notification', orphanRemoval: true)]
#[ORM\OrderBy(['createdAt' => \Doctrine\Common\Collections\Criteria::ASC])] #[ORM\OrderBy(['createdAt' => 'ASC'])]
private Collection $comments; private Collection $comments;
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE)]
private \DateTimeImmutable $date; private \DateTimeImmutable $date;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -85,7 +80,6 @@ class Notification implements TrackUpdateInterface
private array $removedAddresses = []; private array $removedAddresses = [];
#[ORM\ManyToOne(targetEntity: User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?User $sender = null; private ?User $sender = null;
@ -96,8 +90,6 @@ class Notification implements TrackUpdateInterface
/** /**
* @var Collection<User> * @var Collection<User>
*
*
*/ */
#[ORM\ManyToMany(targetEntity: User::class)] #[ORM\ManyToMany(targetEntity: User::class)]
#[ORM\JoinTable(name: 'chill_main_notification_addresses_unread')] #[ORM\JoinTable(name: 'chill_main_notification_addresses_unread')]

View File

@ -18,7 +18,6 @@ use Doctrine\ORM\Event\PrePersistEventArgs;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity] #[ORM\Entity]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
#[ORM\Table('chill_main_notification_comment')] #[ORM\Table('chill_main_notification_comment')]
@ -31,18 +30,15 @@ class NotificationComment implements TrackCreationInterface, TrackUpdateInterfac
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $createdAt = null; private ?\DateTimeImmutable $createdAt = null;
#[ORM\ManyToOne(targetEntity: User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?User $createdBy = null; private ?User $createdBy = null;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null; private ?int $id = null;
#[ORM\ManyToOne(targetEntity: Notification::class, inversedBy: 'comments')] #[ORM\ManyToOne(targetEntity: Notification::class, inversedBy: 'comments')]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private ?Notification $notification = null; private ?Notification $notification = null;
@ -60,7 +56,6 @@ class NotificationComment implements TrackCreationInterface, TrackUpdateInterfac
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $updateAt = null; private ?\DateTimeImmutable $updateAt = null;
#[ORM\ManyToOne(targetEntity: User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?User $updatedBy = null; private ?User $updatedBy = null;

View File

@ -16,7 +16,6 @@ use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE', region: 'acl_cache_region')] #[ORM\Cache(usage: 'NONSTRICT_READ_WRITE', region: 'acl_cache_region')]
#[ORM\Table(name: 'permission_groups')] #[ORM\Table(name: 'permission_groups')]
@ -31,10 +30,9 @@ class PermissionsGroup
/** /**
* @var Collection<GroupCenter> * @var Collection<GroupCenter>
*/ */
#[ORM\OneToMany(targetEntity: \Chill\MainBundle\Entity\GroupCenter::class, mappedBy: 'permissionsGroup')] #[ORM\OneToMany(targetEntity: GroupCenter::class, mappedBy: 'permissionsGroup')]
private Collection $groupCenters; private Collection $groupCenters;
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]
@ -45,10 +43,8 @@ class PermissionsGroup
/** /**
* @var Collection<RoleScope> * @var Collection<RoleScope>
*
*
*/ */
#[ORM\ManyToMany(targetEntity: \Chill\MainBundle\Entity\RoleScope::class, inversedBy: 'permissionsGroups', cascade: ['persist'])] #[ORM\ManyToMany(targetEntity: RoleScope::class, inversedBy: 'permissionsGroups', cascade: ['persist'])]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')] #[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')]
private Collection $roleScopes; private Collection $roleScopes;

View File

@ -21,14 +21,6 @@ use Symfony\Component\Serializer\Annotation\Groups;
/** /**
* PostalCode. * PostalCode.
*
*
*
*
*
*
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
@ -62,13 +54,12 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
private ?string $code = null; private ?string $code = null;
#[Groups(['write', 'read'])] #[Groups(['write', 'read'])]
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Country::class)] #[ORM\ManyToOne(targetEntity: Country::class)]
private ?Country $country = null; private ?Country $country = null;
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true, options: ['default' => null])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true, options: ['default' => null])]
private ?\DateTimeImmutable $deletedAt = null; private ?\DateTimeImmutable $deletedAt = null;
#[Groups(['write', 'read'])] #[Groups(['write', 'read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]

View File

@ -15,21 +15,17 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'regroupment')] #[ORM\Table(name: 'regroupment')]
class Regroupment class Regroupment
{ {
/** /**
*
*
* @var Collection<Center> * @var Collection<Center>
*/ */
#[ORM\ManyToMany(targetEntity: Center::class, inversedBy: 'regroupments')] #[ORM\ManyToMany(targetEntity: Center::class, inversedBy: 'regroupments')]
#[ORM\Id] #[ORM\Id]
private Collection $centers; private Collection $centers;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]

View File

@ -15,13 +15,11 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE', region: 'acl_cache_region')] #[ORM\Cache(usage: 'NONSTRICT_READ_WRITE', region: 'acl_cache_region')]
#[ORM\Table(name: 'role_scopes')] #[ORM\Table(name: 'role_scopes')]
class RoleScope class RoleScope
{ {
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]
@ -30,14 +28,13 @@ class RoleScope
/** /**
* @var Collection<PermissionsGroup> * @var Collection<PermissionsGroup>
*/ */
#[ORM\ManyToMany(targetEntity: \Chill\MainBundle\Entity\PermissionsGroup::class, mappedBy: 'roleScopes')] #[ORM\ManyToMany(targetEntity: PermissionsGroup::class, mappedBy: 'roleScopes')]
private Collection $permissionsGroups; private Collection $permissionsGroups;
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 255)]
private ?string $role = null; private ?string $role = null;
#[ORM\ManyToOne(targetEntity: Scope::class, inversedBy: 'roleScopes')]
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Scope::class, inversedBy: 'roleScopes')]
#[ORM\JoinColumn(nullable: true, name: 'scope_id')] #[ORM\JoinColumn(nullable: true, name: 'scope_id')]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')] #[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')]
private ?Scope $scope = null; private ?Scope $scope = null;

View File

@ -20,7 +20,6 @@ use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\UuidInterface; use Ramsey\Uuid\UuidInterface;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_main_saved_export')] #[ORM\Table(name: 'chill_main_saved_export')]
class SavedExport implements TrackCreationInterface, TrackUpdateInterface class SavedExport implements TrackCreationInterface, TrackUpdateInterface
@ -36,9 +35,8 @@ class SavedExport implements TrackCreationInterface, TrackUpdateInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false, options: ['default' => ''])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false, options: ['default' => ''])]
private string $exportAlias; private string $exportAlias;
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: 'uuid', unique: 'true')] #[ORM\Column(name: 'id', type: 'uuid', unique: true)]
#[ORM\GeneratedValue(strategy: 'NONE')] #[ORM\GeneratedValue(strategy: 'NONE')]
private UuidInterface $id; private UuidInterface $id;

View File

@ -18,7 +18,6 @@ use Symfony\Component\Serializer\Annotation\Context;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap; use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Annotation\Groups; use Symfony\Component\Serializer\Annotation\Groups;
#[DiscriminatorMap(typeProperty: 'type', mapping: ['scope' => Scope::class])] #[DiscriminatorMap(typeProperty: 'type', mapping: ['scope' => Scope::class])]
#[ORM\Entity] #[ORM\Entity]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE', region: 'acl_cache_region')] #[ORM\Cache(usage: 'NONSTRICT_READ_WRITE', region: 'acl_cache_region')]
@ -28,7 +27,6 @@ class Scope
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: false, options: ['default' => true])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: false, options: ['default' => true])]
private bool $active = true; private bool $active = true;
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -37,7 +35,6 @@ class Scope
/** /**
* translatable names. * translatable names.
*
*/ */
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::JSON)]
@ -46,10 +43,8 @@ class Scope
/** /**
* @var Collection<RoleScope> * @var Collection<RoleScope>
*
*
*/ */
#[ORM\OneToMany(targetEntity: \Chill\MainBundle\Entity\RoleScope::class, mappedBy: 'scope')] #[ORM\OneToMany(targetEntity: RoleScope::class, mappedBy: 'scope')]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')] #[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')]
private Collection $roleScopes; private Collection $roleScopes;

View File

@ -27,9 +27,6 @@ use Chill\MainBundle\Validation\Constraint\PhonenumberConstraint;
/** /**
* User. * User.
*
*
*
*/ */
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['user' => User::class])] #[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['user' => User::class])]
#[ORM\Entity] #[ORM\Entity]
@ -37,7 +34,6 @@ use Chill\MainBundle\Validation\Constraint\PhonenumberConstraint;
#[ORM\Table(name: 'users')] #[ORM\Table(name: 'users')]
class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInterface class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInterface
{ {
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]
@ -69,10 +65,8 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
/** /**
* @var Collection<GroupCenter> * @var Collection<GroupCenter>
*
*
*/ */
#[ORM\ManyToMany(targetEntity: \Chill\MainBundle\Entity\GroupCenter::class, inversedBy: 'users')] #[ORM\ManyToMany(targetEntity: GroupCenter::class, inversedBy: 'users')]
#[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')] #[ORM\Cache(usage: 'NONSTRICT_READ_WRITE')]
private Collection $groupCenters; private Collection $groupCenters;
@ -118,7 +112,6 @@ class User implements UserInterface, \Stringable, PasswordAuthenticatedUserInter
/** /**
* The user's mobile phone number. * The user's mobile phone number.
* *
*
* @PhonenumberConstraint() * @PhonenumberConstraint()
*/ */
#[ORM\Column(type: 'phone_number', nullable: true)] #[ORM\Column(type: 'phone_number', nullable: true)]

View File

@ -11,20 +11,17 @@ declare(strict_types=1);
namespace Chill\MainBundle\Entity\User; namespace Chill\MainBundle\Entity\User;
use App\Repository\UserJobHistoryRepository;
use Chill\MainBundle\Entity\User; use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Entity\UserJob; use Chill\MainBundle\Entity\UserJob;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: \Chill\MainBundle\Repository\User\UserJobHistoryRepository::class)]
#[ORM\Entity(repositoryClass: UserJobHistoryRepository::class)]
#[ORM\Table(name: 'chill_main_user_job_history')] #[ORM\Table(name: 'chill_main_user_job_history')]
class UserJobHistory class UserJobHistory
{ {
#[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;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]

View File

@ -11,12 +11,11 @@ declare(strict_types=1);
namespace Chill\MainBundle\Entity\User; namespace Chill\MainBundle\Entity\User;
use App\Repository\UserScopeHistoryRepository;
use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Entity\Scope;
use Chill\MainBundle\Entity\User; use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Repository\User\UserScopeHistoryRepository;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: UserScopeHistoryRepository::class)] #[ORM\Entity(repositoryClass: UserScopeHistoryRepository::class)]
#[ORM\Table(name: 'chill_main_user_scope_history')] #[ORM\Table(name: 'chill_main_user_scope_history')]
class UserScopeHistory class UserScopeHistory
@ -24,7 +23,6 @@ class UserScopeHistory
#[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;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]

View File

@ -14,7 +14,6 @@ namespace Chill\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['user_job' => UserJob::class])] #[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['user_job' => UserJob::class])]
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table('chill_main_user_job')] #[ORM\Table('chill_main_user_job')]
@ -23,7 +22,6 @@ class UserJob
#[ORM\Column(name: 'active', type: \Doctrine\DBAL\Types\Types::BOOLEAN)] #[ORM\Column(name: 'active', type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
protected bool $active = true; protected bool $active = true;
#[Serializer\Groups(['read', 'docgen:read'])] #[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -32,7 +30,6 @@ class UserJob
/** /**
* @var array<string, string> * @var array<string, string>
*
*/ */
#[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)]

View File

@ -19,13 +19,12 @@ use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Workflow\Validator\EntityWorkflowCreation; use Chill\MainBundle\Workflow\Validator\EntityWorkflowCreation;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\Order;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
/** /**
*
*
* @EntityWorkflowCreation(groups={"creation"}) * @EntityWorkflowCreation(groups={"creation"})
*/ */
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['entity_workflow' => EntityWorkflow::class])] #[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['entity_workflow' => EntityWorkflow::class])]
@ -72,7 +71,6 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
#[ORM\OneToMany(targetEntity: EntityWorkflowComment::class, mappedBy: 'entityWorkflow', orphanRemoval: true)] #[ORM\OneToMany(targetEntity: EntityWorkflowComment::class, mappedBy: 'entityWorkflow', orphanRemoval: true)]
private Collection $comments; private Collection $comments;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -85,13 +83,11 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
private int $relatedEntityId; private int $relatedEntityId;
/** /**
*
*
* @var Collection<EntityWorkflowStep> * @var Collection<EntityWorkflowStep>
*/ */
#[Assert\Valid(traverse: true)] #[Assert\Valid(traverse: true)]
#[ORM\OneToMany(targetEntity: EntityWorkflowStep::class, mappedBy: 'entityWorkflow', orphanRemoval: true, cascade: ['persist'])] #[ORM\OneToMany(targetEntity: EntityWorkflowStep::class, mappedBy: 'entityWorkflow', orphanRemoval: true, cascade: ['persist'])]
#[ORM\OrderBy(['transitionAt' => \Doctrine\Common\Collections\Criteria::ASC, 'id' => 'ASC'])] #[ORM\OrderBy(['transitionAt' => Order::Ascending, 'id' => 'ASC'])]
private Collection $steps; private Collection $steps;
/** /**
@ -100,8 +96,6 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
private ?array $stepsChainedCache = null; private ?array $stepsChainedCache = null;
/** /**
*
*
* @var Collection<User> * @var Collection<User>
*/ */
#[ORM\ManyToMany(targetEntity: User::class)] #[ORM\ManyToMany(targetEntity: User::class)]
@ -109,8 +103,6 @@ class EntityWorkflow implements TrackCreationInterface, TrackUpdateInterface
private Collection $subscriberToFinal; private Collection $subscriberToFinal;
/** /**
*
*
* @var Collection<User> * @var Collection<User>
*/ */
#[ORM\ManyToMany(targetEntity: User::class)] #[ORM\ManyToMany(targetEntity: User::class)]

View File

@ -17,7 +17,6 @@ use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait; use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table('chill_main_workflow_entity_comment')] #[ORM\Table('chill_main_workflow_entity_comment')]
class EntityWorkflowComment implements TrackCreationInterface, TrackUpdateInterface class EntityWorkflowComment implements TrackCreationInterface, TrackUpdateInterface
@ -32,7 +31,6 @@ class EntityWorkflowComment implements TrackCreationInterface, TrackUpdateInterf
#[ORM\ManyToOne(targetEntity: EntityWorkflow::class, inversedBy: 'comments')] #[ORM\ManyToOne(targetEntity: EntityWorkflow::class, inversedBy: 'comments')]
private ?EntityWorkflow $entityWorkflow = null; private ?EntityWorkflow $entityWorkflow = null;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]

View File

@ -18,7 +18,6 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table('chill_main_workflow_entity_step')] #[ORM\Table('chill_main_workflow_entity_step')]
class EntityWorkflowStep class EntityWorkflowStep
@ -28,8 +27,6 @@ class EntityWorkflowStep
/** /**
* @var Collection<User> * @var Collection<User>
*
*
*/ */
#[ORM\ManyToMany(targetEntity: User::class)] #[ORM\ManyToMany(targetEntity: User::class)]
#[ORM\JoinTable(name: 'chill_main_workflow_entity_step_cc_user')] #[ORM\JoinTable(name: 'chill_main_workflow_entity_step_cc_user')]
@ -46,8 +43,6 @@ class EntityWorkflowStep
/** /**
* @var Collection<User> * @var Collection<User>
*
*
*/ */
#[ORM\ManyToMany(targetEntity: User::class)] #[ORM\ManyToMany(targetEntity: User::class)]
#[ORM\JoinTable(name: 'chill_main_workflow_entity_step_user')] #[ORM\JoinTable(name: 'chill_main_workflow_entity_step_user')]
@ -55,8 +50,6 @@ class EntityWorkflowStep
/** /**
* @var Collection<User> * @var Collection<User>
*
*
*/ */
#[ORM\ManyToMany(targetEntity: User::class)] #[ORM\ManyToMany(targetEntity: User::class)]
#[ORM\JoinTable(name: 'chill_main_workflow_entity_step_user_by_accesskey')] #[ORM\JoinTable(name: 'chill_main_workflow_entity_step_user_by_accesskey')]
@ -68,7 +61,6 @@ class EntityWorkflowStep
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, options: ['default' => false])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, options: ['default' => false])]
private bool $freezeAfter = false; private bool $freezeAfter = false;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -93,7 +85,6 @@ class EntityWorkflowStep
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true, options: ['default' => null])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true, options: ['default' => null])]
private ?\DateTimeImmutable $transitionAt = null; private ?\DateTimeImmutable $transitionAt = null;
#[ORM\ManyToOne(targetEntity: User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?User $transitionBy = null; private ?User $transitionBy = null;

View File

@ -37,10 +37,10 @@ use Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\LocationValidity
use Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ParticipationOverlap; use Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ParticipationOverlap;
use Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ResourceDuplicateCheck; use Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod\ResourceDuplicateCheck;
use Chill\ThirdPartyBundle\Entity\ThirdParty; use Chill\ThirdPartyBundle\Entity\ThirdParty;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\Criteria; use Doctrine\Common\Collections\Criteria;
use Doctrine\Common\Collections\Order;
use Doctrine\Common\Collections\ReadableCollection; use Doctrine\Common\Collections\ReadableCollection;
use Doctrine\Common\Collections\Selectable; use Doctrine\Common\Collections\Selectable;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
@ -54,8 +54,6 @@ use UnexpectedValueException;
/** /**
* AccompanyingPeriod Class. * AccompanyingPeriod Class.
* *
*
*
* @AccompanyingPeriodValidity(groups={AccompanyingPeriod::STEP_DRAFT, AccompanyingPeriod::STEP_CONFIRMED}) * @AccompanyingPeriodValidity(groups={AccompanyingPeriod::STEP_DRAFT, AccompanyingPeriod::STEP_CONFIRMED})
* *
* @LocationValidity(groups={AccompanyingPeriod::STEP_DRAFT, AccompanyingPeriod::STEP_CONFIRMED}) * @LocationValidity(groups={AccompanyingPeriod::STEP_DRAFT, AccompanyingPeriod::STEP_CONFIRMED})
@ -136,13 +134,13 @@ class AccompanyingPeriod implements
#[Groups(['read', 'write'])] #[Groups(['read', 'write'])]
#[Assert\NotBlank(groups: [AccompanyingPeriod::STEP_CONFIRMED])] #[Assert\NotBlank(groups: [AccompanyingPeriod::STEP_CONFIRMED])]
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Location::class)] #[ORM\ManyToOne(targetEntity: Location::class)]
private ?Location $administrativeLocation = null; private ?Location $administrativeLocation = null;
/** /**
* @var Collection&Selectable<int, Calendar> * @var Collection&Selectable<int, Calendar>
*/ */
#[ORM\OneToMany(targetEntity: \Chill\CalendarBundle\Entity\Calendar::class, mappedBy: 'accompanyingPeriod')] #[ORM\OneToMany(targetEntity: Calendar::class, mappedBy: 'accompanyingPeriod')]
private Collection&Selectable $calendars; private Collection&Selectable $calendars;
#[Groups(['read', 'write', 'docgen:read'])] #[Groups(['read', 'write', 'docgen:read'])]
@ -151,21 +149,18 @@ class AccompanyingPeriod implements
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)]
private ?\DateTime $closingDate = null; private ?\DateTime $closingDate = null;
#[Groups(['read', 'write'])] #[Groups(['read', 'write'])]
#[Assert\NotBlank(groups: [AccompanyingPeriod::STEP_CLOSED])] #[Assert\NotBlank(groups: [AccompanyingPeriod::STEP_CLOSED])]
#[ORM\ManyToOne(targetEntity: \Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive::class)] #[ORM\ManyToOne(targetEntity: ClosingMotive::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?ClosingMotive $closingMotive = null; private ?ClosingMotive $closingMotive = null;
/** /**
*
*
* @var Collection<Comment> * @var Collection<Comment>
*/ */
#[Assert\NotBlank(groups: [AccompanyingPeriod::STEP_DRAFT])] #[Assert\NotBlank(groups: [AccompanyingPeriod::STEP_DRAFT])]
#[ORM\OneToMany(targetEntity: \Chill\PersonBundle\Entity\AccompanyingPeriod\Comment::class, mappedBy: 'accompanyingPeriod', cascade: ['persist', 'remove'], orphanRemoval: true)] #[ORM\OneToMany(targetEntity: Comment::class, mappedBy: 'accompanyingPeriod', cascade: ['persist', 'remove'], orphanRemoval: true)]
#[ORM\OrderBy(['createdAt' => \Doctrine\Common\Collections\Criteria::DESC, 'id' => 'DESC'])] #[ORM\OrderBy(['createdAt' => Order::Descending, 'id' => 'DESC'])]
private Collection $comments; private Collection $comments;
#[Groups(['read', 'write', 'docgen:read'])] #[Groups(['read', 'write', 'docgen:read'])]
@ -176,7 +171,6 @@ class AccompanyingPeriod implements
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE, nullable: true, options: ['default' => null])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE, nullable: true, options: ['default' => null])]
private ?\DateTimeInterface $createdAt = null; private ?\DateTimeInterface $createdAt = null;
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\ManyToOne(targetEntity: User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
@ -186,7 +180,6 @@ class AccompanyingPeriod implements
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, options: ['default' => false])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, options: ['default' => false])]
private bool $emergency = false; private bool $emergency = false;
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -215,7 +208,6 @@ class AccompanyingPeriod implements
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE)]
private ?\DateTime $openingDate = null; private ?\DateTime $openingDate = null;
#[Groups(['read', 'write'])] #[Groups(['read', 'write'])]
#[Assert\NotBlank(groups: [AccompanyingPeriod::STEP_CONFIRMED])] #[Assert\NotBlank(groups: [AccompanyingPeriod::STEP_CONFIRMED])]
#[ORM\ManyToOne(targetEntity: Origin::class)] #[ORM\ManyToOne(targetEntity: Origin::class)]
@ -223,8 +215,8 @@ class AccompanyingPeriod implements
private ?Origin $origin = null; private ?Origin $origin = null;
/** /**
*
* @ParticipationOverlap(groups={AccompanyingPeriod::STEP_DRAFT, AccompanyingPeriod::STEP_CONFIRMED}) * @ParticipationOverlap(groups={AccompanyingPeriod::STEP_DRAFT, AccompanyingPeriod::STEP_CONFIRMED})
*
* @var Collection<AccompanyingPeriodParticipation> * @var Collection<AccompanyingPeriodParticipation>
*/ */
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
@ -234,7 +226,6 @@ class AccompanyingPeriod implements
#[ORM\ManyToOne(targetEntity: Person::class, inversedBy: 'periodLocatedOn')] #[ORM\ManyToOne(targetEntity: Person::class, inversedBy: 'periodLocatedOn')]
private ?Person $personLocation = null; private ?Person $personLocation = null;
#[Groups(['read'])] #[Groups(['read'])]
#[ORM\ManyToOne(targetEntity: Comment::class, cascade: ['persist'])] #[ORM\ManyToOne(targetEntity: Comment::class, cascade: ['persist'])]
#[ORM\JoinColumn(onDelete: 'SET NULL')] #[ORM\JoinColumn(onDelete: 'SET NULL')]
@ -250,12 +241,10 @@ class AccompanyingPeriod implements
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, options: ['default' => false])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, options: ['default' => false])]
private bool $requestorAnonymous = false; private bool $requestorAnonymous = false;
#[ORM\ManyToOne(targetEntity: Person::class, inversedBy: 'accompanyingPeriodRequested')] #[ORM\ManyToOne(targetEntity: Person::class, inversedBy: 'accompanyingPeriodRequested')]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?Person $requestorPerson = null; private ?Person $requestorPerson = null;
#[ORM\ManyToOne(targetEntity: ThirdParty::class)] #[ORM\ManyToOne(targetEntity: ThirdParty::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?ThirdParty $requestorThirdParty = null; private ?ThirdParty $requestorThirdParty = null;
@ -263,17 +252,14 @@ class AccompanyingPeriod implements
/** /**
* @var Collection<resource> * @var Collection<resource>
* *
*
* @ResourceDuplicateCheck(groups={AccompanyingPeriod::STEP_DRAFT, AccompanyingPeriod::STEP_CONFIRMED, "Default", "default"}) * @ResourceDuplicateCheck(groups={AccompanyingPeriod::STEP_DRAFT, AccompanyingPeriod::STEP_CONFIRMED, "Default", "default"})
*/ */
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\OneToMany(targetEntity: \Chill\PersonBundle\Entity\AccompanyingPeriod\Resource::class, mappedBy: 'accompanyingPeriod', cascade: ['persist', 'remove'], orphanRemoval: true)] #[ORM\OneToMany(targetEntity: AccompanyingPeriod\Resource::class, mappedBy: 'accompanyingPeriod', cascade: ['persist', 'remove'], orphanRemoval: true)]
private Collection $resources; private Collection $resources;
/** /**
* @var Collection<Scope> * @var Collection<Scope>
*
*
*/ */
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[Assert\Count(min: 1, groups: [AccompanyingPeriod::STEP_CONFIRMED], minMessage: 'A course must be associated to at least one scope')] #[Assert\Count(min: 1, groups: [AccompanyingPeriod::STEP_CONFIRMED], minMessage: 'A course must be associated to at least one scope')]
@ -283,8 +269,6 @@ class AccompanyingPeriod implements
/** /**
* @var Collection<SocialIssue> * @var Collection<SocialIssue>
*
*
*/ */
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[Assert\Count(min: 1, groups: [AccompanyingPeriod::STEP_CONFIRMED], minMessage: 'A course must contains at least one social issue')] #[Assert\Count(min: 1, groups: [AccompanyingPeriod::STEP_CONFIRMED], minMessage: 'A course must contains at least one social issue')]
@ -311,7 +295,6 @@ class AccompanyingPeriod implements
#[ORM\ManyToOne(targetEntity: User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
private ?User $updatedBy = null; private ?User $updatedBy = null;
#[Groups(['read', 'write', 'docgen:read'])] #[Groups(['read', 'write', 'docgen:read'])]
#[ORM\ManyToOne(targetEntity: User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
@ -420,7 +403,7 @@ class AccompanyingPeriod implements
// ensure continuity of histories // ensure continuity of histories
$criteria = new Criteria(); $criteria = new Criteria();
$criteria->orderBy(['startDate' => \Doctrine\Common\Collections\Order::Ascending, 'id' => \Doctrine\Common\Collections\Order::Ascending]); $criteria->orderBy(['startDate' => Order::Ascending, 'id' => Order::Ascending]);
/** @var \Iterator $locations */ /** @var \Iterator $locations */
$locations = $this->getLocationHistories()->matching($criteria)->getIterator(); $locations = $this->getLocationHistories()->matching($criteria)->getIterator();
@ -1383,7 +1366,7 @@ class AccompanyingPeriod implements
{ {
// ensure continuity of histories // ensure continuity of histories
$criteria = new Criteria(); $criteria = new Criteria();
$criteria->orderBy(['startDate' => \Doctrine\Common\Collections\Order::Ascending, 'id' => \Doctrine\Common\Collections\Order::Ascending]); $criteria->orderBy(['startDate' => Order::Ascending, 'id' => Order::Ascending]);
/** @var \Iterator $steps */ /** @var \Iterator $steps */
$steps = $this->getStepHistories()->matching($criteria)->getIterator(); $steps = $this->getStepHistories()->matching($criteria)->getIterator();

View File

@ -24,8 +24,6 @@ use Doctrine\ORM\Mapping as ORM;
* Usage: * Usage:
* *
* - get the user involved with an accompanying period * - get the user involved with an accompanying period
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'view_chill_person_accompanying_period_info')] #[ORM\Table(name: 'view_chill_person_accompanying_period_info')]
@ -40,8 +38,6 @@ class AccompanyingPeriodInfo
/** /**
* @var string * @var string
*
*
*/ */
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT)]
#[ORM\Id] #[ORM\Id]
@ -49,8 +45,6 @@ class AccompanyingPeriodInfo
/** /**
* @var int * @var int
*
*
*/ */
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\Id] #[ORM\Id]

View File

@ -18,7 +18,6 @@ use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person; use Chill\PersonBundle\Entity\Person;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table('chill_person_accompanying_period_location_history')] #[ORM\Table('chill_person_accompanying_period_location_history')]
class AccompanyingPeriodLocationHistory implements TrackCreationInterface class AccompanyingPeriodLocationHistory implements TrackCreationInterface
@ -31,7 +30,6 @@ class AccompanyingPeriodLocationHistory implements TrackCreationInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: true, options: ['default' => null])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: true, options: ['default' => null])]
private ?\DateTimeImmutable $endDate = null; private ?\DateTimeImmutable $endDate = null;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]

View File

@ -16,10 +16,8 @@ use Chill\MainBundle\Doctrine\Model\TrackCreationTrait;
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface; use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait; use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table('chill_person_accompanying_period_step_history')] #[ORM\Table('chill_person_accompanying_period_step_history')]
class AccompanyingPeriodStepHistory implements TrackCreationInterface, TrackUpdateInterface class AccompanyingPeriodStepHistory implements TrackCreationInterface, TrackUpdateInterface
@ -31,7 +29,6 @@ class AccompanyingPeriodStepHistory implements TrackCreationInterface, TrackUpda
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: true, options: ['default' => null])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: true, options: ['default' => null])]
private ?\DateTimeImmutable $endDate = null; private ?\DateTimeImmutable $endDate = null;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -46,7 +43,6 @@ class AccompanyingPeriodStepHistory implements TrackCreationInterface, TrackUpda
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false)]
private string $step; private string $step;
#[ORM\ManyToOne(targetEntity: ClosingMotive::class)] #[ORM\ManyToOne(targetEntity: ClosingMotive::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?ClosingMotive $closingMotive = null; private ?ClosingMotive $closingMotive = null;

View File

@ -24,12 +24,12 @@ use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
use Chill\ThirdPartyBundle\Entity\ThirdParty; use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\Order;
use Doctrine\Common\Collections\ReadableCollection; use Doctrine\Common\Collections\ReadableCollection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_work' => AccompanyingPeriodWork::class])] #[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_work' => AccompanyingPeriodWork::class])]
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_person_accompanying_period_work')] #[ORM\Table(name: 'chill_person_accompanying_period_work')]
@ -41,15 +41,13 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
private ?AccompanyingPeriod $accompanyingPeriod = null; private ?AccompanyingPeriod $accompanyingPeriod = null;
/** /**
*
*
* @var Collection<AccompanyingPeriodWorkEvaluation> * @var Collection<AccompanyingPeriodWorkEvaluation>
* *
* @internal /!\ the serialization for write evaluations is handled in `AccompanyingPeriodWorkDenormalizer` * @internal /!\ the serialization for write evaluations is handled in `AccompanyingPeriodWorkDenormalizer`
*/ */
#[Serializer\Groups(['read', 'docgen:read'])] #[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\OneToMany(targetEntity: AccompanyingPeriodWorkEvaluation::class, mappedBy: 'accompanyingPeriodWork', cascade: ['remove', 'persist'], orphanRemoval: true)] #[ORM\OneToMany(targetEntity: AccompanyingPeriodWorkEvaluation::class, mappedBy: 'accompanyingPeriodWork', cascade: ['remove', 'persist'], orphanRemoval: true)]
#[ORM\OrderBy(['startDate' => \Doctrine\Common\Collections\Criteria::DESC, 'id' => 'DESC'])] #[ORM\OrderBy(['startDate' => 'DESC', 'id' => 'DESC'])]
private Collection $accompanyingPeriodWorkEvaluations; private Collection $accompanyingPeriodWorkEvaluations;
#[Serializer\Groups(['read', 'docgen:read', 'read:accompanyingPeriodWork:light'])] #[Serializer\Groups(['read', 'docgen:read', 'read:accompanyingPeriodWork:light'])]
@ -64,7 +62,6 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT)]
private string $createdAutomaticallyReason = ''; private string $createdAutomaticallyReason = '';
#[Serializer\Groups(['read', 'docgen:read', 'read:accompanyingPeriodWork:light'])] #[Serializer\Groups(['read', 'docgen:read', 'read:accompanyingPeriodWork:light'])]
#[ORM\ManyToOne(targetEntity: User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
@ -86,7 +83,6 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
#[ORM\ManyToOne(targetEntity: ThirdParty::class)] #[ORM\ManyToOne(targetEntity: ThirdParty::class)]
private ?ThirdParty $handlingThierParty = null; private ?ThirdParty $handlingThierParty = null;
#[Serializer\Groups(['read', 'docgen:read', 'read:accompanyingPeriodWork:light', 'read:evaluation:include-work'])] #[Serializer\Groups(['read', 'docgen:read', 'read:accompanyingPeriodWork:light', 'read:evaluation:include-work'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
@ -99,8 +95,6 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
/** /**
* @var Collection<Person> * @var Collection<Person>
*
*
*/ */
#[Serializer\Groups(['read', 'docgen:read', 'read:accompanyingPeriodWork:light', 'accompanying_period_work:edit', 'accompanying_period_work:create'])] #[Serializer\Groups(['read', 'docgen:read', 'read:accompanyingPeriodWork:light', 'accompanying_period_work:edit', 'accompanying_period_work:create'])]
#[ORM\ManyToMany(targetEntity: Person::class)] #[ORM\ManyToMany(targetEntity: Person::class)]
@ -108,7 +102,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
private Collection $persons; private Collection $persons;
#[Serializer\Groups(['read', 'accompanying_period_work:edit'])] #[Serializer\Groups(['read', 'accompanying_period_work:edit'])]
#[ORM\Embedded(class: \Chill\MainBundle\Entity\Embeddable\PrivateCommentEmbeddable::class, columnPrefix: 'privateComment_')] #[ORM\Embedded(class: PrivateCommentEmbeddable::class, columnPrefix: 'privateComment_')]
private PrivateCommentEmbeddable $privateComment; private PrivateCommentEmbeddable $privateComment;
/** /**
@ -119,8 +113,6 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
/** /**
* @var Collection<Result> * @var Collection<Result>
*
*
*/ */
#[Serializer\Groups(['read', 'docgen:read', 'accompanying_period_work:edit'])] #[Serializer\Groups(['read', 'docgen:read', 'accompanying_period_work:edit'])]
#[ORM\ManyToMany(targetEntity: Result::class, inversedBy: 'accompanyingPeriodWorks')] #[ORM\ManyToMany(targetEntity: Result::class, inversedBy: 'accompanyingPeriodWorks')]
@ -138,8 +130,6 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
/** /**
* @var Collection<ThirdParty> * @var Collection<ThirdParty>
*
*
*/ */
#[Serializer\Groups(['read', 'docgen:read', 'accompanying_period_work:edit'])] #[Serializer\Groups(['read', 'docgen:read', 'accompanying_period_work:edit'])]
#[ORM\ManyToMany(targetEntity: ThirdParty::class)] #[ORM\ManyToMany(targetEntity: ThirdParty::class)]
@ -150,13 +140,11 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE)]
private ?\DateTimeImmutable $updatedAt = null; private ?\DateTimeImmutable $updatedAt = null;
#[Serializer\Groups(['read', 'docgen:read'])] #[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\ManyToOne(targetEntity: User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private ?User $updatedBy = null; private ?User $updatedBy = null;
#[Serializer\Groups(['read', 'accompanying_period_work:edit'])] #[Serializer\Groups(['read', 'accompanying_period_work:edit'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: false, options: ['default' => 1])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER, nullable: false, options: ['default' => 1])]
#[ORM\Version] #[ORM\Version]

View File

@ -15,13 +15,11 @@ use Chill\MainBundle\Doctrine\Model\TrackCreationInterface;
use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface; use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
use Chill\MainBundle\Entity\User; use Chill\MainBundle\Entity\User;
use Chill\PersonBundle\Entity\SocialWork\Evaluation; use Chill\PersonBundle\Entity\SocialWork\Evaluation;
use DateInterval;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_work_evaluation' => AccompanyingPeriodWorkEvaluation::class])] #[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_work_evaluation' => AccompanyingPeriodWorkEvaluation::class])]
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table('chill_person_accompanying_period_work_evaluation')] #[ORM\Table('chill_person_accompanying_period_work_evaluation')]
@ -49,8 +47,6 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
* *
* @see{Chill\PersonBundle\Serializer\Normalizer\AccompanyingPeriodWorkEvaluationDenormalizer} * @see{Chill\PersonBundle\Serializer\Normalizer\AccompanyingPeriodWorkEvaluationDenormalizer}
* *
*
*
* @var Collection<AccompanyingPeriodWorkEvaluationDocument> * @var Collection<AccompanyingPeriodWorkEvaluationDocument>
*/ */
#[Serializer\Groups(['read'])] #[Serializer\Groups(['read'])]
@ -66,7 +62,6 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
#[ORM\ManyToOne(targetEntity: Evaluation::class)] #[ORM\ManyToOne(targetEntity: Evaluation::class)]
private ?Evaluation $evaluation = null; private ?Evaluation $evaluation = null;
#[Serializer\Groups(['read', 'docgen:read'])] #[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]

View File

@ -19,7 +19,6 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_work_evaluation_document' => AccompanyingPeriodWorkEvaluationDocument::class])] #[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_work_evaluation_document' => AccompanyingPeriodWorkEvaluationDocument::class])]
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table('chill_person_accompanying_period_work_evaluation_document')] #[ORM\Table('chill_person_accompanying_period_work_evaluation_document')]
@ -33,11 +32,7 @@ class AccompanyingPeriodWorkEvaluationDocument implements \Chill\MainBundle\Doct
private ?AccompanyingPeriodWorkEvaluation $accompanyingPeriodWorkEvaluation = null; private ?AccompanyingPeriodWorkEvaluation $accompanyingPeriodWorkEvaluation = null;
/** /**
*
*
*
* @internal the default name exceeds 64 characters, we must set manually: * @internal the default name exceeds 64 characters, we must set manually:
*
*/ */
#[Serializer\Groups(['read', 'accompanying_period_work_evaluation:create'])] #[Serializer\Groups(['read', 'accompanying_period_work_evaluation:create'])]
#[ORM\Id] #[ORM\Id]

View File

@ -18,7 +18,6 @@ use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_work_goal' => AccompanyingPeriodWorkGoal::class])] #[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_work_goal' => AccompanyingPeriodWorkGoal::class])]
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_person_accompanying_period_work_goal')] #[ORM\Table(name: 'chill_person_accompanying_period_work_goal')]
@ -31,7 +30,6 @@ class AccompanyingPeriodWorkGoal
#[ORM\ManyToOne(targetEntity: Goal::class)] #[ORM\ManyToOne(targetEntity: Goal::class)]
private ?Goal $goal = null; private ?Goal $goal = null;
#[Serializer\Groups(['read', 'docgen:read'])] #[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
@ -44,8 +42,6 @@ class AccompanyingPeriodWorkGoal
/** /**
* @var Collection<Result> * @var Collection<Result>
*
*
*/ */
#[Serializer\Groups(['accompanying_period_work:edit', 'read', 'docgen:read'])] #[Serializer\Groups(['accompanying_period_work:edit', 'read', 'docgen:read'])]
#[ORM\ManyToMany(targetEntity: Result::class, inversedBy: 'accompanyingPeriodWorkGoals')] #[ORM\ManyToMany(targetEntity: Result::class, inversedBy: 'accompanyingPeriodWorkGoals')]

View File

@ -18,7 +18,6 @@ use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
use Chill\MainBundle\Entity\User; use Chill\MainBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_person_accompanying_period_work_referrer')] #[ORM\Table(name: 'chill_person_accompanying_period_work_referrer')]
class AccompanyingPeriodWorkReferrerHistory implements TrackCreationInterface, TrackUpdateInterface class AccompanyingPeriodWorkReferrerHistory implements TrackCreationInterface, TrackUpdateInterface
@ -26,7 +25,6 @@ class AccompanyingPeriodWorkReferrerHistory implements TrackCreationInterface, T
use TrackCreationTrait; use TrackCreationTrait;
use TrackUpdateTrait; use TrackUpdateTrait;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]

View File

@ -18,8 +18,6 @@ use Symfony\Component\Serializer\Annotation as Serializer;
/** /**
* ClosingMotive give an explanation why we closed the Accompanying period. * ClosingMotive give an explanation why we closed the Accompanying period.
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_person_accompanying_period_closingmotive')] #[ORM\Table(name: 'chill_person_accompanying_period_closingmotive')]
@ -33,10 +31,9 @@ class ClosingMotive
* *
* @var Collection<ClosingMotive> * @var Collection<ClosingMotive>
*/ */
#[ORM\OneToMany(targetEntity: \Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive::class, mappedBy: 'parent')] #[ORM\OneToMany(targetEntity: ClosingMotive::class, mappedBy: 'parent')]
private Collection $children; private Collection $children;
#[Serializer\Groups(['docgen:read'])] #[Serializer\Groups(['docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -51,7 +48,7 @@ class ClosingMotive
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::FLOAT)]
private float $ordering = 0.0; private float $ordering = 0.0;
#[ORM\ManyToOne(targetEntity: \Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive::class, inversedBy: 'children')] #[ORM\ManyToOne(targetEntity: ClosingMotive::class, inversedBy: 'children')]
private ?ClosingMotive $parent = null; private ?ClosingMotive $parent = null;
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: false, options: ['default' => false])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN, nullable: false, options: ['default' => false])]

View File

@ -20,14 +20,12 @@ use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Annotation\Groups; use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
#[DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_comment' => Comment::class])] #[DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_comment' => Comment::class])]
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_person_accompanying_period_comment')] #[ORM\Table(name: 'chill_person_accompanying_period_comment')]
class Comment implements TrackCreationInterface, TrackUpdateInterface class Comment implements TrackCreationInterface, TrackUpdateInterface
{ {
#[ORM\ManyToOne(targetEntity: AccompanyingPeriod::class, inversedBy: 'comments')]
#[ORM\ManyToOne(targetEntity: \Chill\PersonBundle\Entity\AccompanyingPeriod::class, inversedBy: 'comments')]
#[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')] #[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
private ?AccompanyingPeriod $accompanyingPeriod = null; private ?AccompanyingPeriod $accompanyingPeriod = null;
@ -41,13 +39,11 @@ class Comment implements TrackCreationInterface, TrackUpdateInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $createdAt = null; private ?\DateTimeInterface $createdAt = null;
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\ManyToOne(targetEntity: User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private ?User $creator = null; private ?User $creator = null;
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
@ -58,7 +54,6 @@ class Comment implements TrackCreationInterface, TrackUpdateInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $updatedAt = null; private ?\DateTimeInterface $updatedAt = null;
#[Groups(['read'])] #[Groups(['read'])]
#[ORM\ManyToOne(targetEntity: User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]

View File

@ -14,13 +14,11 @@ namespace Chill\PersonBundle\Entity\AccompanyingPeriod;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['origin' => Origin::class])] #[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['origin' => Origin::class])]
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_person_accompanying_period_origin')] #[ORM\Table(name: 'chill_person_accompanying_period_origin')]
class Origin class Origin
{ {
#[Serializer\Groups(['read', 'docgen:read'])] #[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]

View File

@ -20,9 +20,6 @@ use Symfony\Component\Serializer\Annotation\Groups;
/** /**
* **About denormalization**: this operation is operated by @see{AccompanyingPeriodResourdeNormalizer}. * **About denormalization**: this operation is operated by @see{AccompanyingPeriodResourdeNormalizer}.
*
*
*
*/ */
#[DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_resource' => Resource::class])] #[DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_resource' => Resource::class])]
#[ORM\Entity] #[ORM\Entity]
@ -33,8 +30,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
#[ORM\UniqueConstraint(name: 'thirdparty_unique', columns: ['thirdparty_id', 'accompanyingperiod_id'])] #[ORM\UniqueConstraint(name: 'thirdparty_unique', columns: ['thirdparty_id', 'accompanyingperiod_id'])]
class Resource class Resource
{ {
#[ORM\ManyToOne(targetEntity: AccompanyingPeriod::class, inversedBy: 'resources')]
#[ORM\ManyToOne(targetEntity: \Chill\PersonBundle\Entity\AccompanyingPeriod::class, inversedBy: 'resources')]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private ?AccompanyingPeriod $accompanyingPeriod = null; private ?AccompanyingPeriod $accompanyingPeriod = null;
@ -42,20 +38,17 @@ class Resource
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
private ?string $comment = ''; private ?string $comment = '';
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null; private ?int $id = null;
#[Groups(['docgen:read'])] #[Groups(['docgen:read'])]
#[ORM\ManyToOne(targetEntity: Person::class)] #[ORM\ManyToOne(targetEntity: Person::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?Person $person = null; private ?Person $person = null;
#[Groups(['docgen:read'])] #[Groups(['docgen:read'])]
#[ORM\ManyToOne(targetEntity: ThirdParty::class)] #[ORM\ManyToOne(targetEntity: ThirdParty::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]

View File

@ -17,7 +17,6 @@ use Chill\MainBundle\Entity\User;
use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table('chill_person_accompanying_period_user_history')] #[ORM\Table('chill_person_accompanying_period_user_history')]
class UserHistory implements TrackCreationInterface class UserHistory implements TrackCreationInterface
@ -27,22 +26,18 @@ class UserHistory implements TrackCreationInterface
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true, options: ['default' => null])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: true, options: ['default' => null])]
private ?\DateTimeImmutable $endDate = null; private ?\DateTimeImmutable $endDate = null;
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]
private ?int $id = null; private ?int $id = null;
public function __construct( public function __construct(
#[ORM\ManyToOne(targetEntity: AccompanyingPeriod::class, inversedBy: 'userHistories')] #[ORM\ManyToOne(targetEntity: AccompanyingPeriod::class, inversedBy: 'userHistories')]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private ?AccompanyingPeriod $accompanyingPeriod, private ?AccompanyingPeriod $accompanyingPeriod,
#[ORM\ManyToOne(targetEntity: User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private User $user, private User $user,
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: false, options: ['default' => 'now()'])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: false, options: ['default' => 'now()'])]
private \DateTimeImmutable $startDate = new \DateTimeImmutable('now') private \DateTimeImmutable $startDate = new \DateTimeImmutable('now')
) {} ) {}

View File

@ -17,8 +17,6 @@ use Symfony\Component\Serializer\Annotation\Groups;
/** /**
* AccompanyingPeriodParticipation Class. * AccompanyingPeriodParticipation Class.
*
*
*/ */
#[DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_participation' => AccompanyingPeriodParticipation::class])] #[DiscriminatorMap(typeProperty: 'type', mapping: ['accompanying_period_participation' => AccompanyingPeriodParticipation::class])]
#[ORM\Entity] #[ORM\Entity]
@ -29,7 +27,6 @@ class AccompanyingPeriodParticipation
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)]
private ?\DateTime $endDate = null; private ?\DateTime $endDate = null;
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
@ -43,7 +40,7 @@ class AccompanyingPeriodParticipation
public function __construct( public function __construct(
#[ORM\ManyToOne(targetEntity: AccompanyingPeriod::class, inversedBy: 'participations', cascade: ['persist'])] #[ORM\ManyToOne(targetEntity: AccompanyingPeriod::class, inversedBy: 'participations', cascade: ['persist'])]
#[ORM\JoinColumn(name: 'accompanyingperiod_id', referencedColumnName: 'id', nullable: false)] #[ORM\JoinColumn(name: 'accompanyingperiod_id', referencedColumnName: 'id', nullable: false)]
private ?AccompanyingPeriod $accompanyingPeriod, private ?AccompanyingPeriod $accompanyingPeriod,
#[Groups(['read', 'docgen:read'])] #[ORM\ManyToOne(targetEntity: Person::class, inversedBy: 'accompanyingPeriodParticipations')] #[ORM\JoinColumn(name: 'person_id', referencedColumnName: 'id', nullable: false)] #[Groups(['read', 'docgen:read'])] #[ORM\ManyToOne(targetEntity: Person::class, inversedBy: 'accompanyingPeriodParticipations')] #[ORM\JoinColumn(name: 'person_id', referencedColumnName: 'id', nullable: false)]
private ?Person $person private ?Person $person
) { ) {

View File

@ -26,8 +26,6 @@ use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface;
/** /**
*
*
* @MaxHolder(groups={"household_memberships"}) * @MaxHolder(groups={"household_memberships"})
*/ */
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['household' => Household::class])] #[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['household' => Household::class])]
@ -39,14 +37,11 @@ class Household
* Addresses. * Addresses.
* *
* @var Collection<Address> * @var Collection<Address>
*
*
*
*/ */
#[Serializer\Groups(['write'])] #[Serializer\Groups(['write'])]
#[ORM\ManyToMany(targetEntity: \Chill\MainBundle\Entity\Address::class, cascade: ['persist', 'remove', 'merge', 'detach'])] #[ORM\ManyToMany(targetEntity: Address::class, cascade: ['persist', 'remove', 'merge', 'detach'])]
#[ORM\JoinTable(name: 'chill_person_household_to_addresses')] #[ORM\JoinTable(name: 'chill_person_household_to_addresses')]
#[ORM\OrderBy(['validFrom' => \Doctrine\Common\Collections\Criteria::DESC, 'id' => 'DESC'])] #[ORM\OrderBy(['validFrom' => Criteria::DESC, 'id' => 'DESC'])]
private Collection $addresses; private Collection $addresses;
#[ORM\Embedded(class: CommentEmbeddable::class, columnPrefix: 'comment_members_')] #[ORM\Embedded(class: CommentEmbeddable::class, columnPrefix: 'comment_members_')]
@ -54,15 +49,12 @@ class Household
/** /**
* @var Collection&Selectable<int, HouseholdComposition> * @var Collection&Selectable<int, HouseholdComposition>
*
*
*/ */
#[Assert\Valid(traverse: true, groups: ['household_composition'])] #[Assert\Valid(traverse: true, groups: ['household_composition'])]
#[ORM\OneToMany(targetEntity: HouseholdComposition::class, mappedBy: 'household', orphanRemoval: true, cascade: ['persist'])] #[ORM\OneToMany(targetEntity: HouseholdComposition::class, mappedBy: 'household', orphanRemoval: true, cascade: ['persist'])]
#[ORM\OrderBy(['startDate' => \Doctrine\Common\Collections\Criteria::DESC])] #[ORM\OrderBy(['startDate' => Criteria::DESC])]
private Collection&Selectable $compositions; private Collection&Selectable $compositions;
#[Serializer\Groups(['read', 'docgen:read'])] #[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]

View File

@ -20,7 +20,6 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['household_composition_type' => HouseholdCompositionType::class])] #[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['household_composition_type' => HouseholdCompositionType::class])]
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_person_household_composition')] #[ORM\Table(name: 'chill_person_household_composition')]
@ -38,18 +37,15 @@ class HouseholdComposition implements TrackCreationInterface, TrackUpdateInterfa
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: true, options: ['default' => null])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: true, options: ['default' => null])]
private ?\DateTimeImmutable $endDate = null; private ?\DateTimeImmutable $endDate = null;
#[ORM\ManyToOne(targetEntity: Household::class, inversedBy: 'compositions')] #[ORM\ManyToOne(targetEntity: Household::class, inversedBy: 'compositions')]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private ?Household $household = null; private ?Household $household = null;
#[Serializer\Groups(['docgen:read'])] #[Serializer\Groups(['docgen:read'])]
#[ORM\ManyToOne(targetEntity: HouseholdCompositionType::class)] #[ORM\ManyToOne(targetEntity: HouseholdCompositionType::class)]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private ?HouseholdCompositionType $householdCompositionType = null; private ?HouseholdCompositionType $householdCompositionType = null;
#[Serializer\Groups(['read', 'docgen:read'])] #[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]

View File

@ -14,7 +14,6 @@ namespace Chill\PersonBundle\Entity\Household;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['household_composition_type' => HouseholdCompositionType::class])] #[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['household_composition_type' => HouseholdCompositionType::class])]
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_person_household_composition_type')] #[ORM\Table(name: 'chill_person_household_composition_type')]
@ -23,7 +22,6 @@ class HouseholdCompositionType
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
private bool $active = true; private bool $active = true;
#[Serializer\Groups(['read', 'docgen:read'])] #[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]

View File

@ -16,7 +16,6 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_person_household_members')] #[ORM\Table(name: 'chill_person_household_members')]
class HouseholdMember class HouseholdMember
@ -39,7 +38,6 @@ class HouseholdMember
#[ORM\ManyToOne(targetEntity: Household::class)] #[ORM\ManyToOne(targetEntity: Household::class)]
private ?Household $household = null; private ?Household $household = null;
#[Serializer\Groups(['read', 'docgen:read'])] #[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]

View File

@ -38,26 +38,21 @@ use Doctrine\ORM\Mapping as ORM;
* 1. 1st entity: from 2021-01-01 to 2021-06-01, household W, address Q; * 1. 1st entity: from 2021-01-01 to 2021-06-01, household W, address Q;
* 2. 2st entity: from 2021-06-01 to 2021-12-01, household W, address R; * 2. 2st entity: from 2021-06-01 to 2021-12-01, household W, address R;
* 3. 3st entity: from 2021-12-01 to NULL, household V, address T; * 3. 3st entity: from 2021-12-01 to NULL, household V, address T;
*
*
*/ */
#[ORM\Entity(readOnly: true)] #[ORM\Entity(readOnly: true)]
#[ORM\Table(name: 'view_chill_person_household_address')] #[ORM\Table(name: 'view_chill_person_household_address')]
class PersonHouseholdAddress class PersonHouseholdAddress
{ {
#[ORM\Id] #[ORM\Id]
#[ORM\ManyToOne(targetEntity: Address::class)] #[ORM\ManyToOne(targetEntity: Address::class)]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private ?Address $address = null; private ?Address $address = null;
#[ORM\Id] #[ORM\Id]
#[ORM\ManyToOne(targetEntity: Household::class)] #[ORM\ManyToOne(targetEntity: Household::class)]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private ?Household $household = null; private ?Household $household = null;
#[ORM\Id] #[ORM\Id]
#[ORM\ManyToOne(targetEntity: Person::class)] #[ORM\ManyToOne(targetEntity: Person::class)]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]

View File

@ -14,7 +14,6 @@ namespace Chill\PersonBundle\Entity\Household;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['household_position' => Position::class])] #[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['household_position' => Position::class])]
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_person_household_position')] #[ORM\Table(name: 'chill_person_household_position')]
@ -24,7 +23,6 @@ class Position
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::BOOLEAN)]
private bool $allowHolder = false; private bool $allowHolder = false;
#[Serializer\Groups(['read', 'docgen:read'])] #[Serializer\Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]

View File

@ -15,16 +15,12 @@ use Doctrine\ORM\Mapping as ORM;
/** /**
* MaritalStatus. * MaritalStatus.
*
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\HasLifecycleCallbacks] #[ORM\HasLifecycleCallbacks]
#[ORM\Table(name: 'chill_person_marital_status')] #[ORM\Table(name: 'chill_person_marital_status')]
class MaritalStatus class MaritalStatus
{ {
#[ORM\Id] #[ORM\Id]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 7)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 7)]
private ?string $id; private ?string $id;

View File

@ -48,13 +48,8 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
/** /**
* Person Class. * Person Class.
* *
*
*
*
*
*
*
* @PersonHasCenter * @PersonHasCenter
*
* @HouseholdMembershipSequential( * @HouseholdMembershipSequential(
* groups={"household_memberships"} * groups={"household_memberships"}
* ) * )
@ -96,17 +91,14 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
* The person's accompanying periods (when the person was accompanied by the center). * The person's accompanying periods (when the person was accompanied by the center).
* *
* @var Collection<AccompanyingPeriodParticipation> * @var Collection<AccompanyingPeriodParticipation>
*
*
*/ */
#[ORM\OneToMany(targetEntity: AccompanyingPeriodParticipation::class, mappedBy: 'person', cascade: ['persist', 'remove', 'merge', 'detach'])] #[ORM\OneToMany(targetEntity: AccompanyingPeriodParticipation::class, mappedBy: 'person', cascade: ['persist', 'remove', 'merge', 'detach'])]
#[ORM\OrderBy(['startDate' => \Doctrine\Common\Collections\Criteria::DESC])] #[ORM\OrderBy(['startDate' => Criteria::DESC])]
private Collection $accompanyingPeriodParticipations; private Collection $accompanyingPeriodParticipations;
/** /**
* The accompanying period requested by the Person. * The accompanying period requested by the Person.
* *
*
* @var Collection<AccompanyingPeriod> * @var Collection<AccompanyingPeriod>
*/ */
#[ORM\OneToMany(targetEntity: AccompanyingPeriod::class, mappedBy: 'requestorPerson')] #[ORM\OneToMany(targetEntity: AccompanyingPeriod::class, mappedBy: 'requestorPerson')]
@ -116,25 +108,21 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
* Addresses. * Addresses.
* *
* @var Collection<Address> * @var Collection<Address>
*
*
*
*/ */
#[ORM\ManyToMany(targetEntity: \Chill\MainBundle\Entity\Address::class, cascade: ['persist', 'remove', 'merge', 'detach'])] #[ORM\ManyToMany(targetEntity: Address::class, cascade: ['persist', 'remove', 'merge', 'detach'])]
#[ORM\JoinTable(name: 'chill_person_persons_to_addresses')] #[ORM\JoinTable(name: 'chill_person_persons_to_addresses')]
#[ORM\OrderBy(['validFrom' => \Doctrine\Common\Collections\Criteria::DESC])] #[ORM\OrderBy(['validFrom' => Criteria::DESC])]
private Collection $addresses; private Collection $addresses;
/** /**
* @var Collection<PersonAltName> * @var Collection<PersonAltName>
*/ */
#[ORM\OneToMany(targetEntity: \Chill\PersonBundle\Entity\PersonAltName::class, mappedBy: 'person', cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)] #[ORM\OneToMany(targetEntity: PersonAltName::class, mappedBy: 'person', cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)]
private Collection $altNames; private Collection $altNames;
/** /**
* The person's birthdate. * The person's birthdate.
* *
*
* @Birthdate * @Birthdate
*/ */
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE, nullable: true)]
@ -155,16 +143,15 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* @var Collection<int, Calendar> * @var Collection<int, Calendar>
*/ */
#[ORM\ManyToMany(targetEntity: \Chill\CalendarBundle\Entity\Calendar::class, mappedBy: 'persons')] #[ORM\ManyToMany(targetEntity: Calendar::class, mappedBy: 'persons')]
private Collection $calendars; private Collection $calendars;
/** /**
* The person's center. * The person's center.
* *
*
* @deprecated * @deprecated
*/ */
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Center::class)] #[ORM\ManyToOne(targetEntity: Center::class)]
private ?Center $center = null; private ?Center $center = null;
#[ORM\OneToOne(targetEntity: PersonCenterCurrent::class, mappedBy: 'person')] #[ORM\OneToOne(targetEntity: PersonCenterCurrent::class, mappedBy: 'person')]
@ -184,10 +171,8 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* The marital status of the person. * The marital status of the person.
*
*
*/ */
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Civility::class)] #[ORM\ManyToOne(targetEntity: Civility::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?Civility $civility = null; private ?Civility $civility = null;
@ -199,17 +184,14 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* The person's country of birth. * The person's country of birth.
*
*
*/ */
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Country::class)] // sf4 check: option inversedBy="birthsIn" return error mapping !! #[ORM\ManyToOne(targetEntity: Country::class)] // sf4 check: option inversedBy="birthsIn" return error mapping !!
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?Country $countryOfBirth = null; private ?Country $countryOfBirth = null;
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE, nullable: true, options: ['default' => null])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE, nullable: true, options: ['default' => null])]
private ?\DateTimeInterface $createdAt = null; private ?\DateTimeInterface $createdAt = null;
#[ORM\ManyToOne(targetEntity: User::class)] #[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?User $createdBy = null; private ?User $createdBy = null;
@ -273,7 +255,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* Comment on gender. * Comment on gender.
*/ */
#[ORM\Embedded(class: \Chill\MainBundle\Entity\Embeddable\CommentEmbeddable::class, columnPrefix: 'genderComment_')] #[ORM\Embedded(class: CommentEmbeddable::class, columnPrefix: 'genderComment_')]
private CommentEmbeddable $genderComment; private CommentEmbeddable $genderComment;
/** /**
@ -292,9 +274,6 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* The person's id. * The person's id.
*
*
*
*/ */
#[ORM\Id] #[ORM\Id]
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
@ -311,17 +290,15 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* The marital status of the person. * The marital status of the person.
*
*
*/ */
#[ORM\ManyToOne(targetEntity: \Chill\PersonBundle\Entity\MaritalStatus::class)] #[ORM\ManyToOne(targetEntity: MaritalStatus::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?MaritalStatus $maritalStatus = null; private ?MaritalStatus $maritalStatus = null;
/** /**
* Comment on marital status. * Comment on marital status.
*/ */
#[ORM\Embedded(class: \Chill\MainBundle\Entity\Embeddable\CommentEmbeddable::class, columnPrefix: 'maritalStatusComment_')] #[ORM\Embedded(class: CommentEmbeddable::class, columnPrefix: 'maritalStatusComment_')]
private CommentEmbeddable $maritalStatusComment; private CommentEmbeddable $maritalStatusComment;
/** /**
@ -347,10 +324,8 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* The person's nationality. * The person's nationality.
*
*
*/ */
#[ORM\ManyToOne(targetEntity: \Chill\MainBundle\Entity\Country::class)] // sf4 check: option inversedBy="nationals" return error mapping !! #[ORM\ManyToOne(targetEntity: Country::class)] // sf4 check: option inversedBy="nationals" return error mapping !!
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?Country $nationality = null; private ?Country $nationality = null;
@ -364,7 +339,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
* @var Collection<PersonPhone> * @var Collection<PersonPhone>
*/ */
#[Assert\Valid(traverse: true)] #[Assert\Valid(traverse: true)]
#[ORM\OneToMany(targetEntity: \Chill\PersonBundle\Entity\PersonPhone::class, mappedBy: 'person', cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)] #[ORM\OneToMany(targetEntity: PersonPhone::class, mappedBy: 'person', cascade: ['persist', 'remove', 'merge', 'detach'], orphanRemoval: true)]
private Collection $otherPhoneNumbers; private Collection $otherPhoneNumbers;
/** /**
@ -376,7 +351,6 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
/** /**
* The person's phonenumber. * The person's phonenumber.
* *
*
* @PhonenumberConstraint( * @PhonenumberConstraint(
* type="landline", * type="landline",
* ) * )
@ -405,10 +379,8 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
* The person's spoken languages. * The person's spoken languages.
* *
* @var Collection<int, Language> * @var Collection<int, Language>
*
*
*/ */
#[ORM\ManyToMany(targetEntity: \Chill\MainBundle\Entity\Language::class)] #[ORM\ManyToMany(targetEntity: Language::class)]
#[ORM\JoinTable(name: 'persons_spoken_languages', joinColumns: [new ORM\JoinColumn(name: 'person_id', referencedColumnName: 'id')], inverseJoinColumns: [new ORM\JoinColumn(name: 'language_id', referencedColumnName: 'id')])] #[ORM\JoinTable(name: 'persons_spoken_languages', joinColumns: [new ORM\JoinColumn(name: 'person_id', referencedColumnName: 'id')], inverseJoinColumns: [new ORM\JoinColumn(name: 'language_id', referencedColumnName: 'id')])]
private Collection $spokenLanguages; private Collection $spokenLanguages;

View File

@ -21,8 +21,6 @@ use Doctrine\ORM\Mapping as ORM;
* The process of selecting the current center is done on database side, * The process of selecting the current center is done on database side,
* using a SQL view. * using a SQL view.
* *
*
*
* @psalm-internal Chill\PersonBundle\Entity * @psalm-internal Chill\PersonBundle\Entity
*/ */
#[ORM\Entity(readOnly: true)] #[ORM\Entity(readOnly: true)]
@ -35,7 +33,6 @@ class PersonCenterCurrent
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: true, options: ['default' => null])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: true, options: ['default' => null])]
private ?\DateTimeImmutable $endDate = null; private ?\DateTimeImmutable $endDate = null;
#[ORM\Id] #[ORM\Id]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null; private ?int $id = null;

View File

@ -21,8 +21,6 @@ use Doctrine\ORM\Mapping as ORM;
/** /**
* Associate a Person with a Center. The association may change on date intervals. * Associate a Person with a Center. The association may change on date intervals.
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_person_person_center_history')] #[ORM\Table(name: 'chill_person_person_center_history')]
@ -35,7 +33,6 @@ class PersonCenterHistory implements TrackCreationInterface, TrackUpdateInterfac
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: true, options: ['default' => null])] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: true, options: ['default' => null])]
private ?\DateTimeImmutable $endDate = null; private ?\DateTimeImmutable $endDate = null;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]

View File

@ -23,8 +23,6 @@ use Doctrine\ORM\Mapping as ORM;
* *
* The validFrom and validTo properties are the intersection of * The validFrom and validTo properties are the intersection of
* household membership and address validity. See @see{PersonHouseholdAddress} * household membership and address validity. See @see{PersonHouseholdAddress}
*
*
*/ */
#[ORM\Entity(readOnly: true)] #[ORM\Entity(readOnly: true)]
#[ORM\Table('view_chill_person_current_address')] #[ORM\Table('view_chill_person_current_address')]
@ -33,7 +31,6 @@ class PersonCurrentAddress
#[ORM\OneToOne(targetEntity: Address::class)] #[ORM\OneToOne(targetEntity: Address::class)]
protected Address $address; protected Address $address;
#[ORM\Id] #[ORM\Id]
#[ORM\OneToOne(targetEntity: Person::class, inversedBy: 'currentPersonAddress')] #[ORM\OneToOne(targetEntity: Person::class, inversedBy: 'currentPersonAddress')]
#[ORM\JoinColumn(name: 'person_id', referencedColumnName: 'id')] #[ORM\JoinColumn(name: 'person_id', referencedColumnName: 'id')]

View File

@ -24,7 +24,6 @@ use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Component\Validator\Context\ExecutionContextInterface;
#[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['personResource' => PersonResource::class])] #[Serializer\DiscriminatorMap(typeProperty: 'type', mapping: ['personResource' => PersonResource::class])]
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_person_resource')] #[ORM\Table(name: 'chill_person_resource')]
@ -35,21 +34,19 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
use TrackUpdateTrait; use TrackUpdateTrait;
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\Embedded(class: \Chill\MainBundle\Entity\Embeddable\CommentEmbeddable::class, columnPrefix: 'comment_')] #[ORM\Embedded(class: CommentEmbeddable::class, columnPrefix: 'comment_')]
private CommentEmbeddable $comment; private CommentEmbeddable $comment;
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: true)]
private ?string $freeText = null; private ?string $freeText = null;
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null; private ?int $id = null;
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\ManyToOne(targetEntity: PersonResourceKind::class, inversedBy: 'personResources')] #[ORM\ManyToOne(targetEntity: PersonResourceKind::class, inversedBy: 'personResources')]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
@ -57,8 +54,6 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
/** /**
* The person which host the owner of this resource. * The person which host the owner of this resource.
*
*
*/ */
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\ManyToOne(targetEntity: Person::class)] #[ORM\ManyToOne(targetEntity: Person::class)]
@ -67,15 +62,12 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
/** /**
* The person linked with this resource. * The person linked with this resource.
*
*
*/ */
#[Groups(['read'])] #[Groups(['read'])]
#[ORM\ManyToOne(targetEntity: Person::class, inversedBy: 'resources')] #[ORM\ManyToOne(targetEntity: Person::class, inversedBy: 'resources')]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private ?Person $personOwner = null; private ?Person $personOwner = null;
#[Groups(['read', 'docgen:read'])] #[Groups(['read', 'docgen:read'])]
#[ORM\ManyToOne(targetEntity: ThirdParty::class, inversedBy: 'personResources')] #[ORM\ManyToOne(targetEntity: ThirdParty::class, inversedBy: 'personResources')]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]

View File

@ -14,12 +14,10 @@ namespace Chill\PersonBundle\Entity\Person;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation as Serializer; use Symfony\Component\Serializer\Annotation as Serializer;
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_person_resource_kind')] #[ORM\Table(name: 'chill_person_resource_kind')]
class PersonResourceKind class PersonResourceKind
{ {
#[Serializer\Groups(['docgen:read'])] #[Serializer\Groups(['docgen:read'])]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]

View File

@ -20,44 +20,38 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Context; use Symfony\Component\Serializer\Annotation\Context;
use Symfony\Component\Serializer\Annotation\Groups; use Symfony\Component\Serializer\Annotation\Groups;
#[ORM\Entity(repositoryClass: ResidentialAddressRepository::class)] #[ORM\Entity(repositoryClass: ResidentialAddressRepository::class)]
#[ORM\Table(name: 'chill_person_residential_address')] #[ORM\Table(name: 'chill_person_residential_address')]
class ResidentialAddress class ResidentialAddress
{ {
#[Groups(['read'])] #[Groups(['read'])]
#[ORM\ManyToOne(targetEntity: Address::class)] #[ORM\ManyToOne(targetEntity: Address::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?Address $address = null; private ?Address $address = null;
#[ORM\Embedded(class: \Chill\MainBundle\Entity\Embeddable\CommentEmbeddable::class, columnPrefix: 'residentialAddressComment_')] #[ORM\Embedded(class: CommentEmbeddable::class, columnPrefix: 'residentialAddressComment_')]
private CommentEmbeddable $comment; private CommentEmbeddable $comment;
#[Groups(['read'])] #[Groups(['read'])]
#[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;
#[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']])] #[Context(normalizationContext: ['groups' => ['minimal']])]
private ?Person $hostPerson = null; private ?Person $hostPerson = null;
#[Groups(['read'])] #[Groups(['read'])]
#[ORM\ManyToOne(targetEntity: ThirdParty::class)] #[ORM\ManyToOne(targetEntity: ThirdParty::class)]
#[ORM\JoinColumn(nullable: true)] #[ORM\JoinColumn(nullable: true)]
private ?ThirdParty $hostThirdParty = null; private ?ThirdParty $hostThirdParty = null;
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue] #[ORM\GeneratedValue]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(type: \Doctrine\DBAL\Types\Types::INTEGER)]
private ?int $id = null; private ?int $id = null;
#[ORM\ManyToOne(targetEntity: Person::class)] #[ORM\ManyToOne(targetEntity: Person::class)]
#[ORM\JoinColumn(nullable: false)] #[ORM\JoinColumn(nullable: false)]
private Person $person; private Person $person;

View File

@ -16,14 +16,11 @@ use Symfony\Component\Serializer\Annotation\Groups;
/** /**
* PersonAltName. * PersonAltName.
*
*
*/ */
#[ORM\Entity] #[ORM\Entity]
#[ORM\Table(name: 'chill_person_alt_name')] #[ORM\Table(name: 'chill_person_alt_name')]
class PersonAltName class PersonAltName
{ {
#[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)] #[ORM\Column(name: 'id', type: \Doctrine\DBAL\Types\Types::INTEGER)]
#[ORM\Id] #[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')] #[ORM\GeneratedValue(strategy: 'AUTO')]
@ -37,7 +34,7 @@ class PersonAltName
#[ORM\Column(name: 'label', type: \Doctrine\DBAL\Types\Types::TEXT)] #[ORM\Column(name: 'label', type: \Doctrine\DBAL\Types\Types::TEXT)]
private string $label = ''; private string $label = '';
#[ORM\ManyToOne(targetEntity: \Chill\PersonBundle\Entity\Person::class, inversedBy: 'altNames')] #[ORM\ManyToOne(targetEntity: Person::class, inversedBy: 'altNames')]
private ?Person $person = null; private ?Person $person = null;
/** /**

Some files were not shown because too many files have changed in this diff Show More