Merge branch 'master' into issue279_accompanying_period_validation

This commit is contained in:
2021-12-07 17:55:00 +01:00
92 changed files with 3270 additions and 1063 deletions

View File

@@ -120,11 +120,11 @@ class AccompanyingPeriod implements
* @var DateTime
*
* @ORM\Column(type="date", nullable=true)
* @Groups({"read", "write"})
* @Groups({"read", "write", "docgen:read"})
* @Assert\NotBlank(groups={AccompanyingPeriod::STEP_CLOSED})
* @Assert\GreaterThan(propertyPath="openingDate", groups={AccompanyingPeriod::STEP_CLOSED})
*/
private $closingDate;
private ?DateTime $closingDate = null;
/**
* @var AccompanyingPeriod\ClosingMotive
@@ -135,11 +135,9 @@ class AccompanyingPeriod implements
* @Groups({"read", "write"})
* @Assert\NotBlank(groups={AccompanyingPeriod::STEP_CLOSED})
*/
private $closingMotive;
private ?ClosingMotive $closingMotive = null;
/**
* @var Collection
*
* @ORM\OneToMany(targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod\Comment",
* mappedBy="accompanyingPeriod",
* cascade={"persist", "remove"},
@@ -147,33 +145,32 @@ class AccompanyingPeriod implements
* )
* @Assert\NotBlank(groups={AccompanyingPeriod::STEP_DRAFT})
*/
private $comments;
private Collection $comments;
/**
* @var bool
* @ORM\Column(type="boolean", options={"default": false})
* @Groups({"read", "write"})
* @Groups({"read", "write", "docgen:read"})
*/
private $confidential = false;
private bool $confidential = false;
/**
* @ORM\Column(type="datetime", nullable=true, options={"default": NULL})
* @Groups({"docgen:read"})
*/
private DateTimeInterface $createdAt;
private ?DateTimeInterface $createdAt = null;
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @ORM\JoinColumn(nullable=true)
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
*/
private $createdBy;
private ?User $createdBy = null;
/**
* @var bool
* @ORM\Column(type="boolean", options={"default": false})
* @Groups({"read", "write"})
* @Groups({"read", "write", "docgen:read"})
*/
private $emergency = false;
private bool $emergency = false;
/**
* @var int
@@ -181,9 +178,9 @@ class AccompanyingPeriod implements
* @ORM\Id
* @ORM\Column(name="id", type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
*/
private $id;
private ?int $id = null;
/**
* @ORM\ManyToOne(
@@ -205,9 +202,9 @@ class AccompanyingPeriod implements
* @var DateTime
*
* @ORM\Column(type="date")
* @Groups({"read", "write"})
* @Groups({"read", "write", "docgen:read"})
*/
private $openingDate;
private ?DateTime $openingDate = null;
/**
* @ORM\ManyToOne(targetEntity=Origin::class)
@@ -215,18 +212,16 @@ class AccompanyingPeriod implements
* @Groups({"read", "write"})
* @Assert\NotBlank(groups={AccompanyingPeriod::STEP_CONFIRMED})
*/
private $origin;
private ?Origin $origin = null;
/**
* @var Collection
*
* @ORM\OneToMany(targetEntity=AccompanyingPeriodParticipation::class,
* mappedBy="accompanyingPeriod", orphanRemoval=true,
* cascade={"persist", "refresh", "remove", "merge", "detach"})
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
* @ParticipationOverlap(groups={AccompanyingPeriod::STEP_DRAFT, AccompanyingPeriod::STEP_CONFIRMED})
*/
private $participations;
private Collection $participations;
/**
* @ORM\ManyToOne(
@@ -237,48 +232,42 @@ class AccompanyingPeriod implements
private ?Person $personLocation = null;
/**
* @var string
*
* @ORM\Column(type="text")
* @Groups({"read", "write"})
*/
private $remark = '';
private string $remark = '';
/**
* @var bool
* @ORM\Column(type="boolean", options={"default": false})
* @Groups({"read", "write"})
* @Groups({"read", "write", "docgen:read"})
*/
private $requestorAnonymous = false;
private bool $requestorAnonymous = false;
/**
* @ORM\ManyToOne(targetEntity=Person::class, inversedBy="accompanyingPeriodRequested")
* @ORM\JoinColumn(nullable=true)
*/
private $requestorPerson;
private ?Person $requestorPerson = null;
/**
* @ORM\ManyToOne(targetEntity=ThirdParty::class)
* @ORM\JoinColumn(nullable=true)
*/
private $requestorThirdParty;
private ?ThirdParty $requestorThirdParty = null;
/**
* @var Collection
*
* @ORM\OneToMany(
* targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod\Resource",
* mappedBy="accompanyingPeriod",
* cascade={"persist", "remove"},
* orphanRemoval=true
* )
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
* @ResourceDuplicateCheck(groups={AccompanyingPeriod::STEP_DRAFT, AccompanyingPeriod::STEP_CONFIRMED, "Default", "default"})
*/
private $resources;
private Collection $resources;
/**
* @var Collection
* @ORM\ManyToMany(
* targetEntity=Scope::class,
* cascade={}
@@ -288,10 +277,10 @@ class AccompanyingPeriod implements
* joinColumns={@ORM\JoinColumn(name="accompanying_period_id", referencedColumnName="id")},
* inverseJoinColumns={@ORM\JoinColumn(name="scope_id", referencedColumnName="id")}
* )
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
* @Assert\Count(min=1, groups={AccompanyingPeriod::STEP_CONFIRMED}, minMessage="A course must be associated to at least one scope")
*/
private $scopes;
private Collection $scopes;
/**
* @ORM\ManyToMany(
@@ -300,36 +289,35 @@ class AccompanyingPeriod implements
* @ORM\JoinTable(
* name="chill_person_accompanying_period_social_issues"
* )
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
* @Assert\Count(min=1, groups={AccompanyingPeriod::STEP_CONFIRMED}, minMessage="A course must contains at least one social issue")
*/
private Collection $socialIssues;
/**
* @var string
* @ORM\Column(type="string", length=32, nullable=true)
* @Groups({"read"})
*/
private $step = self::STEP_DRAFT;
private string $step = self::STEP_DRAFT;
/**
* @ORM\Column(type="datetime", nullable=true, options={"default": NULL})
*/
private DateTimeInterface $updatedAt;
private ?DateTimeInterface $updatedAt = null;
/**
* @ORM\ManyToOne(
* targetEntity=User::class
* )
*/
private User $updatedBy;
private ?User $updatedBy = null;
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @ORM\JoinColumn(nullable=true)
* @Groups({"read", "write"})
* @Groups({"read", "write", "docgen:read"})
*/
private $user;
private ?User $user = null;
/**
* @ORM\OneToMany(
@@ -355,6 +343,7 @@ class AccompanyingPeriod implements
$this->socialIssues = new ArrayCollection();
$this->comments = new ArrayCollection();
$this->works = new ArrayCollection();
$this->resources = new ArrayCollection();
}
/**
@@ -580,11 +569,19 @@ class AccompanyingPeriod implements
});
}
public function getCreatedAt(): ?DateTime
{
return $this->createdAt;
}
public function getCreatedBy(): ?User
{
return $this->createdBy;
}
/**
* @Groups({"docgen:read"})
*/
public function getCurrentParticipations(): Collection
{
return $this->getOpenParticipations();
@@ -608,7 +605,7 @@ class AccompanyingPeriod implements
*
* @return int
*/
public function getId()
public function getId(): ?int
{
return $this->id;
}
@@ -634,7 +631,7 @@ class AccompanyingPeriod implements
public function getLocation(?DateTimeImmutable $at = null): ?Address
{
if ($this->getPersonLocation() instanceof Person) {
return $this->getPersonLocation()->getCurrentHouseholdAddress($at);
return $this->getPersonLocation()->getCurrentPersonAddress();
}
return $this->getAddressLocation();
@@ -663,7 +660,7 @@ class AccompanyingPeriod implements
*
* @return DateTime
*/
public function getOpeningDate()
public function getOpeningDate(): ?DateTime
{
return $this->openingDate;
}

View File

@@ -53,7 +53,7 @@ use Symfony\Component\Validator\Constraints as Assert;
* cascade={"remove", "persist"},
* orphanRemoval=true
* )
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*
* @internal /!\ the serialization for write evaluations is handled in `AccompanyingPeriodWorkDenormalizer`
*/
@@ -61,24 +61,26 @@ use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Column(type="datetime_immutable")
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private ?DateTimeImmutable $createdAt = null;
/**
* @ORM\Column(type="boolean")
* @Serializer\Groups({"read", "docgen:read"})
*/
private bool $createdAutomatically = false;
/**
* @ORM\Column(type="text")
* @Serializer\Groups({"read", "docgen:read"})
*/
private string $createdAutomaticallyReason = '';
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @ORM\JoinColumn(nullable=false)
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private ?User $createdBy = null;
@@ -86,7 +88,7 @@ use Symfony\Component\Validator\Constraints as Assert;
* @ORM\Column(type="date_immutable", nullable=true, options={"default": null})
* @Serializer\Groups({"accompanying_period_work:create"})
* @Serializer\Groups({"accompanying_period_work:edit"})
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
* @Assert\GreaterThan(propertyPath="startDate",
* message="accompanying_course_work.The endDate should be greater than the start date"
* )
@@ -100,14 +102,14 @@ use Symfony\Component\Validator\Constraints as Assert;
* cascade={"persist"},
* orphanRemoval=true
* )
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
* @Serializer\Groups({"accompanying_period_work:edit"})
*/
private Collection $goals;
/**
* @ORM\ManyToOne(targetEntity=ThirdParty::class)
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
* @Serializer\Groups({"accompanying_period_work:edit"})
*
* In schema : traitant
@@ -118,20 +120,20 @@ use Symfony\Component\Validator\Constraints as Assert;
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private ?int $id;
private ?int $id = null;
/**
* @ORM\Column(type="text")
* @Serializer\Groups({"read", "accompanying_period_work:edit"})
* @Serializer\Groups({"read", "accompanying_period_work:edit", "docgen:read"})
*/
private string $note = '';
/**
* @ORM\ManyToMany(targetEntity=Person::class)
* @ORM\JoinTable(name="chill_person_accompanying_period_work_person")
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
* @Serializer\Groups({"accompanying_period_work:edit"})
* @Serializer\Groups({"accompanying_period_work:create"})
*/
@@ -140,14 +142,14 @@ use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\ManyToMany(targetEntity=Result::class, inversedBy="accompanyingPeriodWorks")
* @ORM\JoinTable(name="chill_person_accompanying_period_work_result")
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
* @Serializer\Groups({"accompanying_period_work:edit"})
*/
private Collection $results;
/**
* @ORM\ManyToOne(targetEntity=SocialAction::class)
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
* @Serializer\Groups({"accompanying_period_work:create"})
*/
private ?SocialAction $socialAction = null;
@@ -156,30 +158,30 @@ use Symfony\Component\Validator\Constraints as Assert;
* @ORM\Column(type="date_immutable")
* @Serializer\Groups({"accompanying_period_work:create"})
* @Serializer\Groups({"accompanying_period_work:edit"})
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private DateTimeImmutable $startDate;
private ?DateTimeImmutable $startDate = null;
/**
* @ORM\ManyToMany(targetEntity=ThirdParty::class)
* @ORM\JoinTable(name="chill_person_accompanying_period_work_third_party")
*
* In schema : intervenants
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
* @Serializer\Groups({"accompanying_period_work:edit"})
*/
private Collection $thirdParties;
/**
* @ORM\Column(type="datetime_immutable")
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private ?DateTimeImmutable $updatedAt = null;
/**
* @ORM\ManyToOne(targetEntity=User::class)
* @ORM\JoinColumn(nullable=false)
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private ?User $updatedBy = null;

View File

@@ -44,7 +44,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
/**
* @ORM\Column(type="text", nullable=false, options={"default": ""})
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
* @Serializer\Groups({"write"})
* @Serializer\Groups({"accompanying_period_work_evaluation:create"})
*/
@@ -52,7 +52,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
/**
* @ORM\Column(type="date_immutable", nullable=true, options={"default": null})
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private ?DateTimeImmutable $createdAt = null;
@@ -60,7 +60,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
* @ORM\ManyToOne(
* targetEntity=User::class
* )
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private ?User $createdBy = null;
@@ -76,7 +76,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
/**
* @ORM\Column(type="date_immutable", nullable=true, options={"default": null})
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
* @Serializer\Groups({"write"})
* @Serializer\Groups({"accompanying_period_work_evaluation:create"})
*/
@@ -86,7 +86,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
* @ORM\ManyToOne(
* targetEntity=Evaluation::class
* )
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
* @Serializer\Groups({"accompanying_period_work_evaluation:create"})
*/
private ?Evaluation $evaluation = null;
@@ -95,7 +95,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private ?int $id = null;
@@ -116,14 +116,14 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
/**
* @ORM\Column(type="date_immutable", nullable=true, options={"default": null})
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
* @Serializer\Groups({"accompanying_period_work_evaluation:create"})
*/
private ?DateTimeImmutable $maxDate = null;
/**
* @ORM\Column(type="date_immutable", nullable=true, options={"default": null})
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
* @Serializer\Groups({"write"})
* @Serializer\Groups({"accompanying_period_work_evaluation:create"})
*/
@@ -131,7 +131,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
/**
* @ORM\Column(type="date_immutable", nullable=true, options={"default": null})
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private ?DateTimeImmutable $updatedAt = null;
@@ -139,7 +139,7 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
* @ORM\ManyToOne(
* targetEntity=User::class
* )
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private ?User $updatedBy = null;
@@ -239,6 +239,18 @@ class AccompanyingPeriodWorkEvaluation implements TrackCreationInterface, TrackU
return $this->updatedBy;
}
/**
* @Serializer\Groups({"docgen:read"})
*/
public function getWarningDate(): ?DateTimeImmutable
{
if (null === $this->getEndDate() || null === $this->getWarningInterval()) {
return null;
}
return $this->getEndDate()->sub($this->getWarningInterval());
}
public function getWarningInterval(): ?DateInterval
{
return $this->warningInterval;

View File

@@ -33,7 +33,7 @@ class Origin
* @ORM\Column(type="integer")
* @Groups({"read"})
*/
private $id;
private ?int $id = null;
/**
* @ORM\Column(type="json")
@@ -45,7 +45,7 @@ class Origin
* @ORM\Column(type="date_immutable", nullable=true)
* @Groups({"read"})
*/
private $noActiveAfter;
private ?DateTimeImmutable $noActiveAfter = null;
public function getId(): ?int
{
@@ -62,7 +62,7 @@ class Origin
return $this->noActiveAfter;
}
public function setLabel(string $label): self
public function setLabel(array $label): self
{
$this->label = $label;

View File

@@ -41,11 +41,10 @@ class Resource
* )
* @ORM\JoinColumn(nullable=false)
*/
private $accompanyingPeriod;
private ?AccompanyingPeriod $accompanyingPeriod = null;
/**
* @ORM\ManyToOne(targetEntity=Comment::class)
* @ORM\JoinColumn(nullable=true)
*/
private $comment;
@@ -53,21 +52,23 @@ class Resource
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
*/
private $id;
private ?int $id = null;
/**
* @ORM\ManyToOne(targetEntity=Person::class)
* @ORM\JoinColumn(nullable=true)
* @Groups({"docgen:read"})
*/
private $person;
private ?Person $person = null;
/**
* @ORM\ManyToOne(targetEntity=ThirdParty::class)
* @ORM\JoinColumn(nullable=true)
* @Groups({"docgen:read"})
*/
private $thirdParty;
private ?ThirdParty $thirdParty = null;
public function getAccompanyingPeriod(): ?AccompanyingPeriod
{

View File

@@ -11,7 +11,7 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Entity;
use DateTimeImmutable;
use DateTime;
use DateTimeInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
@@ -32,38 +32,38 @@ class AccompanyingPeriodParticipation
* @ORM\ManyToOne(targetEntity=AccompanyingPeriod::class, inversedBy="participations", cascade={"persist"})
* @ORM\JoinColumn(name="accompanyingperiod_id", referencedColumnName="id", nullable=false)
*/
private $accompanyingPeriod;
private ?AccompanyingPeriod $accompanyingPeriod = null;
/**
* @ORM\Column(type="date", nullable=true)
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
*/
private $endDate;
private ?DateTime $endDate = null;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
*/
private $id;
private ?int $id = null;
/**
* @ORM\ManyToOne(targetEntity=Person::class, inversedBy="accompanyingPeriodParticipations")
* @ORM\JoinColumn(name="person_id", referencedColumnName="id", nullable=false)
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
*/
private $person;
private ?Person $person = null;
/**
* @ORM\Column(type="date", nullable=false)
* @Groups({"read"})
* @Groups({"read", "docgen:read"})
*/
private $startDate;
private ?DateTime $startDate = null;
public function __construct(AccompanyingPeriod $accompanyingPeriod, Person $person)
{
$this->startDate = new DateTimeImmutable('now');
$this->startDate = new DateTime('now');
$this->accompanyingPeriod = $accompanyingPeriod;
$this->person = $person;
}
@@ -73,10 +73,6 @@ class AccompanyingPeriodParticipation
return $this->accompanyingPeriod;
}
/*
* public function setStartDate(\DateTimeInterface $startDate): self { $this->startDate = $startDate; return $this; }
*/
public function getEndDate(): ?DateTimeInterface
{
return $this->endDate;

View File

@@ -59,7 +59,7 @@ class Household
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private ?int $id = null;
@@ -68,17 +68,19 @@ class Household
* targetEntity=HouseholdMember::class,
* mappedBy="household"
* )
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private Collection $members;
/**
* @ORM\Column(type="boolean", name="waiting_for_birth", options={"default": false})
* @Serializer\Groups({"docgen:read"})
*/
private bool $waitingForBirth = false;
/**
* @ORM\Column(type="date_immutable", name="waiting_for_birth_date", nullable=true, options={"default": null})
* @Serializer\Groups({"docgen:read"})
*/
private ?DateTimeImmutable $waitingForBirthDate = null;
@@ -134,7 +136,7 @@ class Household
}
/**
* @Serializer\Groups({ "read" })
* @Serializer\Groups({"read", "docgen:read"})
* @Serializer\SerializedName("current_address")
*/
public function getCurrentAddress(?DateTime $at = null): ?Address
@@ -154,6 +156,9 @@ class Household
return null;
}
/**
* @Serializer\Groups({"docgen:read"})
*/
public function getCurrentMembers(?DateTimeImmutable $now = null): Collection
{
return $this->getMembers()->matching($this->buildCriteriaCurrentMembers($now));

View File

@@ -28,13 +28,13 @@ class HouseholdMember
{
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private ?string $comment = null;
/**
* @ORM\Column(type="date_immutable", nullable=true, options={"default": null})
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
* @Assert\GreaterThan(
* propertyPath="startDate",
* message="household_membership.The end date must be after start date",
@@ -45,7 +45,7 @@ class HouseholdMember
/**
* @ORM\Column(type="boolean", options={"default": false})
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private bool $holder = false;
@@ -63,7 +63,7 @@ class HouseholdMember
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private $id;
@@ -72,7 +72,7 @@ class HouseholdMember
* @ORM\ManyToOne(
* targetEntity="\Chill\PersonBundle\Entity\Person"
* )
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
* @Assert\Valid(groups={"household_memberships"})
* @Assert\NotNull(groups={"household_memberships"})
*/
@@ -80,7 +80,7 @@ class HouseholdMember
/**
* @ORM\ManyToOne(targetEntity=Position::class)
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
* @Assert\NotNull(groups={"household_memberships_created"})
*/
private ?Position $position = null;
@@ -92,7 +92,7 @@ class HouseholdMember
/**
* @ORM\Column(type="date_immutable", nullable=true, options={"default": null})
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
* @Assert\NotNull(groups={"household_memberships"})
*/
private ?DateTimeImmutable $startDate = null;

View File

@@ -33,25 +33,25 @@ class Position
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Serializer\Groups({ "read" })
* @Serializer\Groups({"read", "docgen:read"})
*/
private ?int $id;
/**
* @ORM\Column(type="json")
* @Serializer\Groups({ "read" })
* @Serializer\Groups({"read", "docgen:read"})
*/
private array $label = [];
/**
* @ORM\Column(type="float")
* @Serializer\Groups({ "read" })
* @Serializer\Groups({"read"})
*/
private float $ordering = 0.00;
/**
* @ORM\Column(type="boolean")
* @Serializer\Groups({ "read" })
* @Serializer\Groups({"read"})
*/
private bool $shareHouseHold = true;

View File

@@ -28,21 +28,21 @@ class Evaluation
* @ORM\Column(type="dateinterval", nullable=true, options={"default": null})
* @Serializer\Groups({"read"})
*/
private $delay;
private ?DateInterval $delay = null;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private $id;
private ?int $id = null;
/**
* @ORM\Column(type="dateinterval", nullable=true, options={"default": null})
* @Serializer\Groups({"read"})
*/
private $notificationDelay;
private ?DateInterval $notificationDelay = null;
/**
* @ORM\ManyToOne(
@@ -50,13 +50,13 @@ class Evaluation
* inversedBy="evaluations"
* )
*/
private $socialAction;
private ?SocialAction $socialAction = null;
/**
* @ORM\Column(type="json")
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private $title = [];
private array $title = [];
public function getDelay(): ?DateInterval
{

View File

@@ -38,7 +38,7 @@ class Goal
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private $id;
@@ -55,7 +55,7 @@ class Goal
/**
* @ORM\Column(type="json")
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private $title = [];

View File

@@ -55,7 +55,7 @@ class Result
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private $id;
@@ -66,7 +66,7 @@ class Result
/**
* @ORM\Column(type="json")
* @Serializer\Groups({"read"})
* @Serializer\Groups({"read", "docgen:read"})
*/
private $title = [];