|
|
@@ -7,6 +7,7 @@ use ApiPlatform\Metadata\Get;
|
|
|
use ApiPlatform\Metadata\GetCollection;
|
|
|
use ApiPlatform\Metadata\Post;
|
|
|
use ApiPlatform\Metadata\Put;
|
|
|
+use App\Attribute\OrganizationDefaultValue;
|
|
|
use App\Entity\Organization\Organization;
|
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
|
use Doctrine\Common\Collections\Collection;
|
|
|
@@ -16,7 +17,8 @@ use Doctrine\ORM\Mapping as ORM;
|
|
|
* Motif d'absence ou de retard
|
|
|
*
|
|
|
* Security :
|
|
|
- * - @see src/Doctrine/Booking/AttendanceBookingReasonExtension.php
|
|
|
+ *
|
|
|
+ * @see \App\Doctrine\Education\AttendanceBookingReasonExtension.php
|
|
|
*/
|
|
|
#[ApiResource(operations: [
|
|
|
new Get(
|
|
|
@@ -36,6 +38,7 @@ use Doctrine\ORM\Mapping as ORM;
|
|
|
])]
|
|
|
//#[Auditable]
|
|
|
#[ORM\Table(name: 'AttendanceBookingReason')]
|
|
|
+#[OrganizationDefaultValue(fieldName: "organization")]
|
|
|
#[ORM\Entity]
|
|
|
class AttendanceBookingReason
|
|
|
{
|
|
|
@@ -75,7 +78,7 @@ class AttendanceBookingReason
|
|
|
return $this->organization;
|
|
|
}
|
|
|
|
|
|
- public function setOrganization(Organization $organization): self
|
|
|
+ public function setOrganization(?Organization $organization): self
|
|
|
{
|
|
|
$this->organization = $organization;
|
|
|
return $this;
|