Browse Source

Merge branch 'develop' into 'feature/subdomains'

# Conflicts:
#   .env
#   config/services.yaml
#   src/Entity/Organization/Organization.php
Olivier Massot 3 years ago
parent
commit
0aa9826ba0
100 changed files with 24248 additions and 19 deletions
  1. 6 0
      .env
  2. 1 0
      composer.json
  3. 5 19
      config/packages/elastica.yaml
  4. 24 0
      config/packages/elastica/educationNotation.yaml
  5. 20 0
      config/packages/elastica/organization.yaml
  6. 6 0
      config/services.yaml
  7. 59 0
      old/Entity/AccessAndFunction/Access.php
  8. 244 0
      old/Entity/AccessAndFunction/AccessCommunication.php
  9. 127 0
      old/Entity/AccessAndFunction/AccessFamily.php
  10. 331 0
      old/Entity/AccessAndFunction/AccessNetworkSetting.php
  11. 397 0
      old/Entity/AccessAndFunction/AccessSocial.php
  12. 123 0
      old/Entity/AccessAndFunction/FunctionType.php
  13. 283 0
      old/Entity/AccessAndFunction/OrganizationFunction.php
  14. 143 0
      old/Entity/AccessAndFunction/OrganizationResponsability.php
  15. 221 0
      old/Entity/AccessAndFunction/PersonalizedList.php
  16. 440 0
      old/Entity/AccessAndFunction/Repository/AccessRepository.php
  17. 54 0
      old/Entity/AccessAndFunction/Repository/OrganizationFunctionRepository.php
  18. 223 0
      old/Entity/AccessWish/AccessFamilyWish.php
  19. 363 0
      old/Entity/AccessWish/AccessTmp.php
  20. 1306 0
      old/Entity/AccessWish/AccessWish.php
  21. 282 0
      old/Entity/AccessWish/DocumentWish.php
  22. 452 0
      old/Entity/AccessWish/EducationStudentWish.php
  23. 32 0
      old/Entity/AccessWish/Repository/AccessWishRepository.php
  24. 42 0
      old/Entity/AccessWish/Repository/EducationStudentWishRepository.php
  25. 653 0
      old/Entity/Awin/Product.php
  26. 493 0
      old/Entity/Bank/BankAccount.php
  27. 66 0
      old/Entity/Bank/Repository/BankAccountRepository.php
  28. 287 0
      old/Entity/Billing/AbstractBillingIntangible.php
  29. 97 0
      old/Entity/Billing/AbstractBillingPayer.php
  30. 507 0
      old/Entity/Billing/AccessBilling.php
  31. 198 0
      old/Entity/Billing/AccessFictionalIntangible.php
  32. 144 0
      old/Entity/Billing/AccessIntangible.php
  33. 98 0
      old/Entity/Billing/AccessPayer.php
  34. 26 0
      old/Entity/Billing/AdvancePayment.php
  35. 162 0
      old/Entity/Billing/BergerLevrault.php
  36. 25 0
      old/Entity/Billing/Bill.php
  37. 468 0
      old/Entity/Billing/BillAccessDetail.php
  38. 1539 0
      old/Entity/Billing/BillAccounting.php
  39. 10 0
      old/Entity/Billing/BillAccountingInterface.php
  40. 23 0
      old/Entity/Billing/BillCredit.php
  41. 180 0
      old/Entity/Billing/BillDebitBalance.php
  42. 555 0
      old/Entity/Billing/BillLine.php
  43. 523 0
      old/Entity/Billing/BillPayment.php
  44. 242 0
      old/Entity/Billing/BillPeriod.php
  45. 203 0
      old/Entity/Billing/BillTotalDetail.php
  46. 1095 0
      old/Entity/Billing/BillingExportSetting.php
  47. 222 0
      old/Entity/Billing/BillingIntangibleExcludeDate.php
  48. 1090 0
      old/Entity/Billing/BillingSetting.php
  49. 495 0
      old/Entity/Billing/BillingSettingRent.php
  50. 161 0
      old/Entity/Billing/Ciril.php
  51. 145 0
      old/Entity/Billing/EducationalProjectIntangible.php
  52. 82 0
      old/Entity/Billing/EducationalProjectPayer.php
  53. 258 0
      old/Entity/Billing/FamilyQuotient.php
  54. 221 0
      old/Entity/Billing/Jvs.php
  55. 471 0
      old/Entity/Billing/PayfipPaymentReturn.php
  56. 250 0
      old/Entity/Billing/Pes.php
  57. 577 0
      old/Entity/Billing/PesSetting.php
  58. 34 0
      old/Entity/Billing/Repository/AccessBillingRepository.php
  59. 52 0
      old/Entity/Billing/Repository/AccessIntangibleRepository.php
  60. 34 0
      old/Entity/Billing/Repository/AdvancePaymentRepository.php
  61. 33 0
      old/Entity/Billing/Repository/BillCreditRepository.php
  62. 32 0
      old/Entity/Billing/Repository/BillRepository.php
  63. 25 0
      old/Entity/Billing/Repository/SddBankRepository.php
  64. 25 0
      old/Entity/Billing/Repository/SddRegieRepository.php
  65. 195 0
      old/Entity/Billing/ResidenceArea.php
  66. 185 0
      old/Entity/Billing/SddBank.php
  67. 215 0
      old/Entity/Billing/SddRegie.php
  68. 73 0
      old/Entity/Billing/SddTeneur.php
  69. 528 0
      old/Entity/Booking/AbstractBooking.php
  70. 203 0
      old/Entity/Booking/AbstractBookingRecur.php
  71. 242 0
      old/Entity/Booking/Attendance.php
  72. 342 0
      old/Entity/Booking/AttendanceBooking.php
  73. 224 0
      old/Entity/Booking/CalendarSynchro.php
  74. 540 0
      old/Entity/Booking/Course.php
  75. 24 0
      old/Entity/Booking/CourseRecur.php
  76. 668 0
      old/Entity/Booking/EducationalProject.php
  77. 277 0
      old/Entity/Booking/EducationalProjectAge.php
  78. 158 0
      old/Entity/Booking/EducationalProjectPublic.php
  79. 23 0
      old/Entity/Booking/EducationalProjectRecur.php
  80. 711 0
      old/Entity/Booking/Event.php
  81. 144 0
      old/Entity/Booking/EventGender.php
  82. 23 0
      old/Entity/Booking/EventRecur.php
  83. 182 0
      old/Entity/Booking/EventReport.php
  84. 263 0
      old/Entity/Booking/EventUser.php
  85. 352 0
      old/Entity/Booking/Examen.php
  86. 432 0
      old/Entity/Booking/ExamenConvocation.php
  87. 23 0
      old/Entity/Booking/ExamenRecur.php
  88. 31 0
      old/Entity/Booking/OrganizationHoliday.php
  89. 23 0
      old/Entity/Booking/OrganizationHolidayRecur.php
  90. 120 0
      old/Entity/Booking/PersonHoliday.php
  91. 23 0
      old/Entity/Booking/PersonHolidayRecur.php
  92. 39 0
      old/Entity/Booking/Repository/AttendanceBookingRepository.php
  93. 13 0
      old/Entity/Booking/Repository/BookingRepository.php
  94. 36 0
      old/Entity/Booking/Repository/CalendarSynchroRepository.php
  95. 67 0
      old/Entity/Booking/Repository/CourseRepository.php
  96. 42 0
      old/Entity/Booking/Repository/EducationalProjectRepository.php
  97. 86 0
      old/Entity/Booking/Repository/EventRepository.php
  98. 224 0
      old/Entity/Booking/Work.php
  99. 137 0
      old/Entity/Booking/WorkByUser.php
  100. 395 0
      old/Entity/Core/AbstractControl.php

+ 6 - 0
.env

@@ -84,3 +84,9 @@ MAILER_DSN=smtp://localhost
 ###> bindfile populate buffer file
 BIND_FILE_BUFFER_FILE=/env/subdomain.txt
 ###< bindfile populate buffer file
+
+###> elasticsearch ###
+ELASTICSEARCH_HOST=localhost
+ELASTICSEARCH_PORT=9200
+###< elasticsearch ###
+

+ 1 - 0
composer.json

@@ -54,6 +54,7 @@
     },
     "require-dev": {
         "cyclonedx/cyclonedx-php-composer": "^3.4",
+        "rector/rector": "^0.12.*",
         "symfony/debug-bundle": "5.4.*",
         "symfony/maker-bundle": "^1.21",
         "symfony/phpunit-bridge": "^5.4",

+ 5 - 19
config/packages/elastica.yaml

@@ -1,6 +1,9 @@
+imports:
+  - { resource: elastica/ }
+
 fos_elastica:
   clients:
-    default: { host: 'es', port: '9200' }
+    default: { host: '%env(resolve:ELASTICSEARCH_HOST)%', port: '%env(resolve:ELASTICSEARCH_PORT)%' }
   indexes:
     search:
       use_alias: true
@@ -21,21 +24,4 @@ fos_elastica:
               custom_search_analyzer:
                 type:    custom
                 tokenizer:    standard
-                filter:    [standard, asciifolding ,lowercase]
-      types:
-        organization:
-          persistence:
-            driver: orm
-            model: 'App\Entity\Organization\Organization'
-            listener: ~
-            finder: ~
-            elastica_to_model_transformer:
-              ignore_missing: true
-            provider: ~
-          mappings:
-            id:
-              index: not_analyzed
-              type: integer
-            name:
-              analyzer: custom_analyzer
-              search_analyzer: custom_search_analyzer
+                filter:    [standard, asciifolding ,lowercase]

+ 24 - 0
config/packages/elastica/educationNotation.yaml

@@ -0,0 +1,24 @@
+fos_elastica:
+  indexes:
+    search:
+      types:
+        educationNotation:
+          persistence:
+            driver: orm
+            model: 'App\Entity\Education\EducationNotation'
+            listener: ~
+            finder: ~
+            elastica_to_model_transformer:
+              ignore_missing: true
+          mappings:
+            id:
+              index: not_analyzed
+              type: integer
+            note_origine:
+              analyzer: custom_analyzer
+              search_analyzer: custom_search_analyzer
+              property_path: false
+            note_recalcul:
+              analyzer: custom_analyzer
+              search_analyzer: custom_search_analyzer
+              property_path: false

+ 20 - 0
config/packages/elastica/organization.yaml

@@ -0,0 +1,20 @@
+fos_elastica:
+  indexes:
+    search:
+      types:
+        organization:
+          persistence:
+            driver: orm
+            model: 'App\Entity\Organization\Organization'
+            listener: ~
+            finder: ~
+            elastica_to_model_transformer:
+              ignore_missing: true
+            provider: ~
+          mappings:
+            id:
+              index: not_analyzed
+              type: integer
+            name:
+              analyzer: custom_analyzer
+              search_analyzer: custom_search_analyzer

+ 6 - 0
config/services.yaml

@@ -95,3 +95,9 @@ services:
     App\EventListener\DoctrineFilter\DoctrineFilterListener:
         tags:
             - { name: kernel.event_listener, event: kernel.request }
+
+    #########################################
+    ##  ELASTIC SERVICE ##
+    App\Service\Elasticsearch\EducationNotationUpdate:
+        arguments:
+            - '@fos_elastica.object_persister.search.educationNotation'

File diff suppressed because it is too large
+ 59 - 0
old/Entity/AccessAndFunction/Access.php


+ 244 - 0
old/Entity/AccessAndFunction/AccessCommunication.php

@@ -0,0 +1,244 @@
+<?php
+
+namespace AppBundle\Entity\AccessAndFunction;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+use AppBundle\Validator\Constraints\Access as OpentalentAssert;
+
+/**
+ * Paramètres d'abonnement à la com pour un Access
+ *
+ * @Iri("http://schema.org/AccessCommunication")
+ */
+#[ORM\Entity]
+class AccessCommunication
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    //INSERT INTO AccessCommunication (access_id, culturalNewsletter, adminNewsletter, userNewsletter, opentalentBusinessNewsletter, partnerBusinessNewsletter)
+    //SELECT Access.id as accessId, true,true,true,true,false
+    //FROM Access
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['accesscommunication'])]
+    private $id;
+    /**
+     * @var Access
+     */
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'accessCommunication', cascade: ['persist'], fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: true, onDelete: 'CASCADE')]
+    #[Groups(['accesscommunication'])]
+    private $access;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => true])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accesscommunication'])]
+    private $culturalNewsletter = true;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => true])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accesscommunication'])]
+    private $adminNewsletter = true;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => true])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accesscommunication'])]
+    private $userNewsletter = true;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => true])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accesscommunication'])]
+    private $opentalentBusinessNewsletter = true;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accesscommunication'])]
+    private $partnerBusinessNewsletter = false;
+    /**
+     * The constructor
+     */
+    public function __construct() {
+
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set culturalNewsletter
+     *
+     * @param boolean $culturalNewsletter
+     *
+     * @return AccessCommunication
+     */
+    public function setCulturalNewsletter($culturalNewsletter)
+    {
+        $this->culturalNewsletter = $culturalNewsletter;
+
+        return $this;
+    }
+    /**
+     * Get culturalNewsletter
+     *
+     * @return boolean
+     */
+    public function getCulturalNewsletter()
+    {
+        return $this->culturalNewsletter;
+    }
+    /**
+     * Set adminNewsletter
+     *
+     * @param boolean $adminNewsletter
+     *
+     * @return AccessCommunication
+     */
+    public function setAdminNewsletter($adminNewsletter)
+    {
+        $this->adminNewsletter = $adminNewsletter;
+
+        return $this;
+    }
+    /**
+     * Get adminNewsletter
+     *
+     * @return boolean
+     */
+    public function getAdminNewsletter()
+    {
+        return $this->adminNewsletter;
+    }
+    /**
+     * Set partnerBusinessNewsletter
+     *
+     * @param boolean $partnerBusinessNewsletter
+     *
+     * @return AccessCommunication
+     */
+    public function setPartnerBusinessNewsletter($partnerBusinessNewsletter)
+    {
+        $this->partnerBusinessNewsletter = $partnerBusinessNewsletter;
+
+        return $this;
+    }
+    /**
+     * Get partnerBusinessNewsletter
+     *
+     * @return boolean
+     */
+    public function getPartnerBusinessNewsletter()
+    {
+        return $this->partnerBusinessNewsletter;
+    }
+    /**
+     * Set access
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $access
+     *
+     * @return AccessCommunication
+     */
+    public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access = null)
+    {
+        $this->access = $access;
+
+        return $this;
+    }
+    /**
+     * Get access
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getAccess()
+    {
+        return $this->access;
+    }
+    /**
+     * Set userNewsletter
+     *
+     * @param boolean $userNewsletter
+     *
+     * @return AccessCommunication
+     */
+    public function setUserNewsletter($userNewsletter)
+    {
+        $this->userNewsletter = $userNewsletter;
+
+        return $this;
+    }
+    /**
+     * Get userNewsletter
+     *
+     * @return boolean
+     */
+    public function getUserNewsletter()
+    {
+        return $this->userNewsletter;
+    }
+    /**
+     * Set opentalentBusinessNewsletter
+     *
+     * @param boolean $opentalentBusinessNewsletter
+     *
+     * @return AccessCommunication
+     */
+    public function setOpentalentBusinessNewsletter($opentalentBusinessNewsletter)
+    {
+        $this->opentalentBusinessNewsletter = $opentalentBusinessNewsletter;
+
+        return $this;
+    }
+    /**
+     * Get opentalentBusinessNewsletter
+     *
+     * @return boolean
+     */
+    public function getOpentalentBusinessNewsletter()
+    {
+        return $this->opentalentBusinessNewsletter;
+    }
+}

+ 127 - 0
old/Entity/AccessAndFunction/AccessFamily.php

@@ -0,0 +1,127 @@
+<?php
+
+namespace AppBundle\Entity\AccessAndFunction;
+
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Fais le lien entre les Access dont les titulaires sont membres d'une même famille
+ * (cf. table 'children_guardians' pour les responsables légaux)
+ */
+#[ORM\Entity]
+class AccessFamily
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['accessfamily', 'access_details', 'student_registration', 'access_informations_edit', 'online_registration_access_family'])]
+    private $id;
+    /**
+     * @var ArrayCollection<Access>
+     */
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', mappedBy: 'accessFamily')]
+    #[Groups(['accessfamily_accesses', 'student_registration_accessfamily', 'access_informations_edit_accessfamily', 'access_details_accessfamily', 'online_registration_access_family_accessfamily'])]
+    private $accesses;
+    /**
+     * @var ArrayCollection<AccessFictionalIntangible>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Billing\AccessFictionalIntangible', mappedBy: 'accessFamily', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['accessfamily_accessfictionalintangible'])]
+    private $accessFictionalIntangibles;
+    public function __construct()
+    {
+        $this->accesses = new ArrayCollection();
+        $this->accessFictionalIntangibles = new ArrayCollection();
+    }
+    /**
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * @param int $id
+     * @return FunctionType
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+        return $this;
+    }
+    /**
+     * Add accessFictionalIntangible
+     *
+     * @param \AppBundle\Entity\Billing\AccessFictionalIntangible $accessFictionalIntangible
+     *
+     * @return AccessFamily
+     */
+    public function addAccessFictionalIntangible(\AppBundle\Entity\Billing\AccessFictionalIntangible $accessFictionalIntangible)
+    {
+        $this->accessFictionalIntangibles[] = $accessFictionalIntangible;
+
+        return $this;
+    }
+    /**
+     * Remove accessFictionalIntangible
+     *
+     * @param \AppBundle\Entity\Billing\AccessFictionalIntangible $accessFictionalIntangible
+     */
+    public function removeAccessFictionalIntangible(\AppBundle\Entity\Billing\AccessFictionalIntangible $accessFictionalIntangible)
+    {
+        $this->accessFictionalIntangibles->removeElement($accessFictionalIntangible);
+    }
+    /**
+     * Get accessFictionalIntangibles
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getAccessFictionalIntangibles()
+    {
+        return $this->accessFictionalIntangibles;
+    }
+    /**
+     * Add access
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $access
+     *
+     * @return AccessFamily
+     */
+    public function addAccess(\AppBundle\Entity\AccessAndFunction\Access $access)
+    {
+        $access->setAccessFamily($this);
+        $this->accesses[] = $access;
+
+        return $this;
+    }
+    /**
+     * Remove access
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $access
+     */
+    public function removeAccess(\AppBundle\Entity\AccessAndFunction\Access $access)
+    {
+        $access->setAccessFamily(null);
+        $this->accesses->removeElement($access);
+    }
+    /**
+     * Get accesses
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getAccesses()
+    {
+        return $this->accesses;
+    }
+}

+ 331 - 0
old/Entity/AccessAndFunction/AccessNetworkSetting.php

@@ -0,0 +1,331 @@
+<?php
+
+namespace AppBundle\Entity\AccessAndFunction;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+
+/**
+ * Informations relatives au réseau, pour un Access
+ *
+ * @Iri("http://schema.org/AccessNetworkSetting")
+ */
+#[ORM\Entity]
+class AccessNetworkSetting
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['accessnetworksetting', 'accesscmfnetwork', 'access_details', 'student_list', 'guardians_list', 'teachers_list', 'adherent_list', 'personnels_list', 'ca_list', 'accesses_list', 'student_list', 'guardians_list', 'teachers_list', 'adherent_list', 'personnels_list', 'morals_list', 'othercontact_list', 'student_registration', 'board_list', 'own_access', 'access_informations_edit'])]
+    private $id;
+    /**
+     * @var Access
+     */
+    #[Assert\Valid]
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'accessNetworkSetting', cascade: ['persist'], fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: true, onDelete: 'CASCADE')]
+    #[Groups(['accessnetworksetting'])]
+    private $access;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => true])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accessnetworksetting', 'accesscmfnetwork_accessnetworksetting', 'access_details_accessnetworksetting', 'accesses_list_accessnetworksetting', 'student_list_accessnetworksetting', 'guardians_list_accessnetworksetting', 'teachers_list_accessnetworksetting', 'adherent_list_accessnetworksetting', 'personnels_list_accessnetworksetting', 'morals_list_accessnetworksetting', 'ca_list_accessnetworksetting', 'othercontact_list_accessnetworksetting', 'board_list_accessnetworksetting'])]
+    private $subscriptionCmfPaper = true;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => true])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accessnetworksetting', 'accesscmfnetwork_accessnetworksetting'])]
+    private $subscriptionEducationalInformationCmfPaper = true;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => true])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accessnetworksetting', 'accesscmfnetwork_accessnetworksetting'])]
+    private $subscriptionOtherInformationCmfPaper = true;
+    /**
+     * @var integer
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['accessnetworksetting', 'accesscmfnetwork_accessnetworksetting', 'access_details_accessnetworksetting', 'accesses_list_accessnetworksetting', 'student_list_accessnetworksetting', 'guardians_list_accessnetworksetting', 'teachers_list_accessnetworksetting', 'adherent_list_accessnetworksetting', 'personnels_list_accessnetworksetting', 'morals_list_accessnetworksetting', 'ca_list_accessnetworksetting', 'othercontact_list_accessnetworksetting', 'board_list_accessnetworksetting'])]
+    private $numberPaperCopies;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => true])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accessnetworksetting', 'accesscmfnetwork_accessnetworksetting', 'access_details_accessnetworksetting', 'accesses_list_accessnetworksetting', 'student_list_accessnetworksetting', 'guardians_list_accessnetworksetting', 'teachers_list_accessnetworksetting', 'adherent_list_accessnetworksetting', 'personnels_list_accessnetworksetting', 'morals_list_accessnetworksetting', 'ca_list_accessnetworksetting', 'othercontact_list_accessnetworksetting', 'board_list_accessnetworksetting', 'own_access_accessnetworksetting'])]
+    private $receivesDigitalCmfNewletterAndInformation = true;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['AppBundle\Enum\AccessAndFunction\LicenseTypeEnum', 'toArray'])]
+    #[Groups(['accessnetworksetting', 'access_details_accessnetworksetting', 'student_list_accessnetworksetting', 'guardians_list_accessnetworksetting', 'teachers_list_accessnetworksetting', 'adherent_list_accessnetworksetting', 'personnels_list_accessnetworksetting', 'ca_list_accessnetworksetting', 'accesses_list_accessnetworksetting', 'student_registration_accessnetworksetting', 'board_list_accessnetworksetting', 'access_informations_edit_accessnetworksetting'])]
+    private $licenseType;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['AppBundle\Enum\AccessAndFunction\LicenseRateEnum', 'toArray'])]
+    #[Groups(['accessnetworksetting', 'access_details_accessnetworksetting', 'student_list_accessnetworksetting', 'guardians_list_accessnetworksetting', 'teachers_list_accessnetworksetting', 'adherent_list_accessnetworksetting', 'personnels_list_accessnetworksetting', 'ca_list_accessnetworksetting', 'accesses_list_accessnetworksetting', 'student_list_accessnetworksetting', 'guardians_list_accessnetworksetting', 'teachers_list_accessnetworksetting', 'adherent_list_accessnetworksetting', 'student_registration_accessnetworksetting', 'board_list_accessnetworksetting', 'access_informations_edit_accessnetworksetting'])]
+    private $licenseRate;
+    /**
+     * @var \DateTime Date of first entry into the structure.
+     *
+     * @Iri("https://schema.org/birthDate")
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date(message: 'invalid-date')]
+    #[Groups(['accessnetworksetting', 'accesses_list_accessnetworksetting', 'ca_list_accessnetworksetting', 'adherent_list_accessnetworksetting', 'accesscmfnetwork_accessnetworksetting', 'access_details_accessnetworksetting', 'board_list_accessnetworksetting'])]
+    private $dateFirstEntry;
+    /**
+     * The constructor
+     */
+    public function __construct() {
+
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set subscriptionCmfPaper
+     *
+     * @param boolean $subscriptionCmfPaper
+     *
+     * @return AccessNetworkSetting
+     */
+    public function setSubscriptionCmfPaper($subscriptionCmfPaper)
+    {
+        $this->subscriptionCmfPaper = $subscriptionCmfPaper;
+
+        return $this;
+    }
+    /**
+     * Get subscriptionCmfPaper
+     *
+     * @return boolean
+     */
+    public function getSubscriptionCmfPaper()
+    {
+        return $this->subscriptionCmfPaper;
+    }
+    /**
+     * Set numberPaperCopies
+     *
+     * @param integer $numberPaperCopies
+     *
+     * @return AccessNetworkSetting
+     */
+    public function setNumberPaperCopies($numberPaperCopies)
+    {
+        $this->numberPaperCopies = $numberPaperCopies;
+
+        return $this;
+    }
+    /**
+     * Get numberPaperCopies
+     *
+     * @return integer
+     */
+    public function getNumberPaperCopies()
+    {
+        return $this->numberPaperCopies;
+    }
+    /**
+     * Set receivesDigitalCmfNewletterAndInformation
+     *
+     * @param boolean $receivesDigitalCmfNewletterAndInformation
+     *
+     * @return AccessNetworkSetting
+     */
+    public function setReceivesDigitalCmfNewletterAndInformation($receivesDigitalCmfNewletterAndInformation)
+    {
+        $this->receivesDigitalCmfNewletterAndInformation = $receivesDigitalCmfNewletterAndInformation;
+
+        return $this;
+    }
+    /**
+     * Get receivesDigitalCmfNewletterAndInformation
+     *
+     * @return boolean
+     */
+    public function getReceivesDigitalCmfNewletterAndInformation()
+    {
+        return $this->receivesDigitalCmfNewletterAndInformation;
+    }
+    /**
+     * Set access
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $access
+     *
+     * @return AccessNetworkSetting
+     */
+    public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access = null)
+    {
+        $this->access = $access;
+
+        return $this;
+    }
+    /**
+     * Get access
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getAccess()
+    {
+        return $this->access;
+    }
+    /**
+     * Set licenseType
+     *
+     * @param string $licenseType
+     *
+     * @return Access
+     */
+    public function setLicenseType($licenseType)
+    {
+        $this->licenseType = $licenseType;
+
+        return $this;
+    }
+    /**
+     * Get licenseType
+     *
+     * @return string
+     */
+    public function getLicenseType()
+    {
+        return $this->licenseType;
+    }
+    /**
+     * Set licenseRate
+     *
+     * @param string $licenseRate
+     *
+     * @return Access
+     */
+    public function setLicenseRate($licenseRate)
+    {
+        $this->licenseRate = $licenseRate;
+
+        return $this;
+    }
+    /**
+     * Get licenseRate
+     *
+     * @return string
+     */
+    public function getLicenseRate()
+    {
+        return $this->licenseRate;
+    }
+    /**
+     * Set dateFirstEntry
+     *
+     * @param \DateTime $dateFirstEntry
+     *
+     * @return Person
+     */
+    public function setDateFirstEntry($dateFirstEntry)
+    {
+        $this->dateFirstEntry = $dateFirstEntry;
+
+        return $this;
+    }
+    /**
+     * Get dateFirstEntry
+     *
+     * @return \DateTime
+     */
+    public function getDateFirstEntry()
+    {
+        return $this->dateFirstEntry ? $this->dateFirstEntry->format('Y-m-d') : $this->dateFirstEntry;
+    }
+    /**
+     * Set subscriptionEducationalInformationCmfPaper
+     *
+     * @param boolean $subscriptionEducationalInformationCmfPaper
+     *
+     * @return AccessNetworkSetting
+     */
+    public function setSubscriptionEducationalInformationCmfPaper($subscriptionEducationalInformationCmfPaper)
+    {
+        $this->subscriptionEducationalInformationCmfPaper = $subscriptionEducationalInformationCmfPaper;
+
+        return $this;
+    }
+    /**
+     * Get subscriptionEducationalInformationCmfPaper
+     *
+     * @return boolean
+     */
+    public function getSubscriptionEducationalInformationCmfPaper()
+    {
+        return $this->subscriptionEducationalInformationCmfPaper;
+    }
+    /**
+     * Set subscriptionOtherInformationCmfPaper
+     *
+     * @param boolean $subscriptionOtherInformationCmfPaper
+     *
+     * @return AccessNetworkSetting
+     */
+    public function setSubscriptionOtherInformationCmfPaper($subscriptionOtherInformationCmfPaper)
+    {
+        $this->subscriptionOtherInformationCmfPaper = $subscriptionOtherInformationCmfPaper;
+
+        return $this;
+    }
+    /**
+     * Get subscriptionOtherInformationCmfPaper
+     *
+     * @return boolean
+     */
+    public function getSubscriptionOtherInformationCmfPaper()
+    {
+        return $this->subscriptionOtherInformationCmfPaper;
+    }
+}

+ 397 - 0
old/Entity/AccessAndFunction/AccessSocial.php

@@ -0,0 +1,397 @@
+<?php
+
+namespace AppBundle\Entity\AccessAndFunction;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+use AppBundle\Validator\Constraints\Access as OpentalentAssert;
+
+/**
+ * Caractéristiques socio-professionnelles pour un Access
+ *
+ * @Iri("http://schema.org/AccessSocial")
+ */
+#[ORM\Entity]
+class AccessSocial
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['accesssocial', 'access_mass', 'teachers_list', 'personnels_list', 'access_details', 'accesses_list', 'student_list', 'guardians_list', 'teachers_list', 'adherent_list', 'personnels_list', 'ca_list', 'othercontact_list', 'board_list', 'fusion_accesses'])]
+    private $id;
+    /**
+     * @var Access
+     */
+    #[Assert\Valid]
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'accessSocial', cascade: ['persist'], fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: true, onDelete: 'CASCADE')]
+    #[Groups(['accesssocial'])]
+    private $access;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\AccessSocial\ProfessionalStatusEnum', 'toArray'])]
+    #[Groups(['accesssocial', 'access_details_accesssocial', 'access_mass_accesssocial', 'fusion_accesses_accesssocial'])]
+    private $professionalStatus;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\AccessSocial\TypeOfContractEnum', 'toArray'])]
+    #[Groups(['accesssocial', 'teachers_list_accesssocial', 'access_mass_accesssocial', 'personnels_list_accesssocial', 'access_details_accesssocial', 'personnels_list_accesssocial', 'fusion_accesses_accesssocial'])]
+    private $typeOfContract;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    private $assistedContract;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\AccessSocial\PeriodUnitEnum', 'toArray'])]
+    #[Groups(['accesssocial', 'access_mass_accesssocial', 'access_details_accesssocial', 'fusion_accesses_accesssocial'])]
+    private $periodUnit;
+    /**
+     * @var string
+     *
+     * @OpentalentAssert\SocialSecurity
+     */
+    #[ORM\Column(type: 'string', length: 15, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accesssocial', 'access_details_accesssocial', 'accesses_list_accesssocial', 'student_list_accesssocial', 'guardians_list_accesssocial', 'teachers_list_accesssocial', 'adherent_list_accesssocial', 'personnels_list_accesssocial', 'ca_list_accesssocial', 'othercontact_list_accesssocial', 'board_list_accesssocial', 'fusion_accesses_accesssocial'])]
+    private $socialSecurity;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\AccessSocial\FamilySituationEnum', 'toArray'])]
+    #[Groups(['accesssocial', 'access_mass_accesssocial', 'access_details_accesssocial', 'accesses_list_accesssocial', 'guardians_list_accesssocial', 'fusion_accesses_accesssocial'])]
+    private $familySituation;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 15, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accesssocial', 'accesses_list_accesssocial', 'guardians_list_accesssocial'])]
+    private $dependentChildren;
+    /**
+     * @var string
+     *
+     * @OpentalentAssert\RecipientNumber
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accesssocial', 'access_details_accesssocial', 'accesses_list_accesssocial', 'student_list_accesssocial', 'guardians_list_accesssocial', 'teachers_list_accesssocial', 'adherent_list_accesssocial', 'personnels_list_accesssocial', 'ca_list_accesssocial', 'othercontact_list_accesssocial', 'board_list_accesssocial'])]
+    private $recipientNumber;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true, length: 20)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accesssocial', 'teachers_list_accesssocial', 'personnels_list_accesssocial'])]
+    private $salaryNumber;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true, length: 30)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accesssocial', 'teachers_list_accesssocial', 'personnels_list_accesssocial'])]
+    private $attachmentService;
+    /**
+     * The constructor
+     */
+    public function __construct() {
+
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Sets expertLevel.
+     *
+     * @param string $expertLevel
+     *
+     * @return $this
+     */
+    public function setExpertLevel($expertLevel)
+    {
+        $this->expertLevel = $expertLevel;
+
+        return $this;
+    }
+    /**
+     * Gets expertLevel.
+     *
+     * @return string
+     */
+    public function getExpertLevel()
+    {
+        return $this->expertLevel;
+    }
+    /**
+     * Sets professionalStatus.
+     *
+     * @param string $professionalStatus
+     *
+     * @return $this
+     */
+    public function setProfessionalStatus($professionalStatus)
+    {
+        $this->professionalStatus = $professionalStatus;
+
+        return $this;
+    }
+    /**
+     * Gets professionalStatus.
+     *
+     * @return string
+     */
+    public function getProfessionalStatus()
+    {
+        return $this->professionalStatus;
+    }
+    /**
+     * Sets typeOfContract.
+     *
+     * @param string $typeOfContract
+     *
+     * @return $this
+     */
+    public function setTypeOfContract($typeOfContract)
+    {
+        $this->typeOfContract = $typeOfContract;
+
+        return $this;
+    }
+    /**
+     * Gets typeOfContract.
+     *
+     * @return string
+     */
+    public function getTypeOfContract()
+    {
+        return $this->typeOfContract;
+    }
+    /**
+     * Sets assistedContract.
+     *
+     * @param string $assistedContract
+     *
+     * @return $this
+     */
+    public function setAssistedContract($assistedContract)
+    {
+        $this->assistedContract = $assistedContract;
+
+        return $this;
+    }
+    /**
+     * Gets assistedContract.
+     *
+     * @return string
+     */
+    public function getAssistedContract()
+    {
+        return $this->assistedContract;
+    }
+    /**
+     * Sets periodUnit.
+     *
+     * @param string $periodUnit
+     *
+     * @return $this
+     */
+    public function setPeriodUnit($periodUnit)
+    {
+        $this->periodUnit = $periodUnit;
+
+        return $this;
+    }
+    /**
+     * Gets periodUnit.
+     *
+     * @return string
+     */
+    public function getPeriodUnit()
+    {
+        return $this->periodUnit;
+    }
+    /**
+     * Sets socialSecurity.
+     *
+     * @param string $socialSecurity
+     *
+     * @return $this
+     */
+    public function setSocialSecurity($socialSecurity)
+    {
+        $this->socialSecurity = $socialSecurity;
+
+        return $this;
+    }
+    /**
+     * Gets socialSecurity.
+     *
+     * @return string
+     */
+    public function getSocialSecurity()
+    {
+        return $this->socialSecurity;
+    }
+    /**
+     * Sets familySituation.
+     *
+     * @param string $familySituation
+     *
+     * @return $this
+     */
+    public function setFamilySituation($familySituation)
+    {
+        $this->familySituation = $familySituation;
+
+        return $this;
+    }
+    /**
+     * Gets familySituation.
+     *
+     * @return string
+     */
+    public function getFamilySituation()
+    {
+        return $this->familySituation;
+    }
+    /**
+     * Sets dependentChildren.
+     *
+     * @param string $dependentChildren
+     *
+     * @return $this
+     */
+    public function setDependentChildren($dependentChildren)
+    {
+        $this->dependentChildren = $dependentChildren;
+
+        return $this;
+    }
+    /**
+     * Gets dependentChildren.
+     *
+     * @return string
+     */
+    public function getDependentChildren()
+    {
+        return $this->dependentChildren;
+    }
+    /**
+     * Set access
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $access
+     *
+     * @return AccessSocial
+     */
+    public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access = null)
+    {
+        $this->access = $access;
+
+        return $this;
+    }
+    /**
+     * Get access
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getAccess()
+    {
+        return $this->access;
+    }
+    /**
+     * Set recipientNumber
+     *
+     * @param string $recipientNumber
+     *
+     * @return AccessSocial
+     */
+    public function setRecipientNumber($recipientNumber)
+    {
+        $this->recipientNumber = $recipientNumber;
+
+        return $this;
+    }
+    /**
+     * Get recipientNumber
+     *
+     * @return string
+     */
+    public function getRecipientNumber()
+    {
+        return $this->recipientNumber;
+    }
+    /**
+     * @return string
+     */
+    public function getSalaryNumber()
+    {
+        return $this->salaryNumber;
+    }
+    /**
+     * @param $salaryNumber
+     */
+    public function setSalaryNumber($salaryNumber)
+    {
+        $this->salaryNumber = $salaryNumber;
+        return $this;
+    }
+    /**
+     * @return string
+     */
+    public function getAttachmentService()
+    {
+        return $this->attachmentService;
+    }
+    /**
+     * @param $attachmentService
+     */
+    public function setAttachmentService($attachmentService)
+    {
+        $this->attachmentService = $attachmentService;
+        return $this;
+    }
+}

+ 123 - 0
old/Entity/AccessAndFunction/FunctionType.php

@@ -0,0 +1,123 @@
+<?php
+
+namespace AppBundle\Entity\AccessAndFunction;
+
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Enum des fonctions que peuvent occuper un Access au sein d'une Organization
+ */
+#[ORM\Entity]
+class FunctionType
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['functiontype'])]
+    private $id;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: false)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\AccessAndFunction\TypeFunctionEnum', 'toArray'])]
+    #[Groups(['functiontype', 'access_details_organizationfunction', 'licence_cmf_organizationfunction', 'access_informations_edit_organizationfunction'])]
+    private $functionType;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(type: 'string', nullable: false)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\AccessAndFunction\FunctionEnum', 'toArray'])]
+    #[Groups(['functiontype', 'access_details_organizationfunction', 'adherent_list_organizationfunction', 'personnels_list_organizationfunction', 'othercontact_list_organizationfunction', 'ca_list_organizationfunction', 'accesses_list_organizationfunction', 'board_list_organizationfunction', 'licence_cmf_organizationfunction', 'access_informations_edit_organizationfunction', 'adherent_contact_organizationfunction', 'cotisation_responsibles_accesses_organizationfunction', 'networkmanagers_list_organizationfunction', 'online_registration_access_details_organizationfunction', 'accesscmfnetwork_organizationfunction'])]
+    private $mission;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: false)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\AccessAndFunction\RoleEnum', 'toArray'])]
+    private $roleByDefault;
+    public function __construct()
+    {
+
+    }
+    /**
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * @param int $id
+     * @return FunctionType
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+        return $this;
+    }
+    /**
+     * @return string
+     */
+    public function getFunctionType()
+    {
+        return $this->functionType;
+    }
+    /**
+     * @param string $functionType
+     * @return $this
+     */
+    public function setFunctionType($functionType)
+    {
+        $this->functionType = $functionType;
+        return $this;
+    }
+    /**
+     * @return string
+     */
+    public function getMission()
+    {
+        return $this->mission;
+    }
+    /**
+     * @param string $mission
+     * @return $this
+     */
+    public function setMission($mission)
+    {
+        $this->mission = $mission;
+        return $this;
+    }
+    /**
+     * @return string
+     */
+    public function getRoleByDefault()
+    {
+        return $this->roleByDefault;
+    }
+    /**
+     * @param string $roleByDefault
+     * @return $this
+     */
+    public function setRoleByDefault($roleByDefault)
+    {
+        $this->roleByDefault = $roleByDefault;
+        return $this;
+    }
+}

+ 283 - 0
old/Entity/AccessAndFunction/OrganizationFunction.php

@@ -0,0 +1,283 @@
+<?php
+
+namespace AppBundle\Entity\AccessAndFunction;
+use AppBundle\Annotation\DefaultField;
+use AppBundle\Annotation\ExportSplitFields;
+use AppBundle\Entity\Traits\ActivityPeriodTrait;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use AppBundle\Entity\Organization\Activity;
+
+/**
+ * Fonction d'un Access dans une Organization sur une période donnée
+ *
+ * @Iri("http://schema.org/OrganizationFunction")
+ */
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\AccessAndFunction\Repository\OrganizationFunctionRepository')]
+class OrganizationFunction
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    use ActivityPeriodTrait;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['organizationfunction', 'access_details', 'adherent_list', 'personnels_list', 'ca_list', 'accesses_list', 'othercontact_list', 'student_registration', 'student_registration_guardians', 'student_registration_accessfamily', 'board_list', 'licence_cmf', 'organization_function_edit', 'access_informations_edit', 'adherent_contact', 'cotisation_responsibles_accesses', 'view_from_manager_create', 'networkmanagers_list', 'online_registration_access_details', 'accesscmfnetwork'])]
+    private $id;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToOne(targetEntity: 'Access', inversedBy: 'organizationFunction')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['organizationfunction', 'organization_function_edit'])]
+    private $access;
+    /**
+     * @var FunctionType
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\FunctionType')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['organizationfunction', 'access_details_organizationfunction', 'adherent_list_organizationfunction', 'personnels_list_organizationfunction', 'othercontact_list_organizationfunction', 'ca_list_organizationfunction', 'accesses_list_organizationfunction', 'student_registration_organizationfunction', 'student_registration_guardians', 'student_registration_accessfamily', 'board_list_organizationfunction', 'licence_cmf_organizationfunction', 'access_informations_edit_organizationfunction', 'adherent_contact_organizationfunction', 'organization_function_edit', 'cotisation_responsibles_accesses_organizationfunction', 'view_from_manager_create_organizationfunction', 'networkmanagers_list_organizationfunction', 'online_registration_access_details_organizationfunction', 'accesscmfnetwork_organizationfunction'])]
+    private $functionType;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['organizationfunction', 'access_details_organizationfunction', 'organization_function_edit', 'othercontact_list_organizationfunction', 'networkmanagers_list_organizationfunction', 'personnels_list_organizationfunction'])]
+    private $functionComplement;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\AccessAndFunction\DeparturesCauseEnum', 'toArray'])]
+    #[Groups(['organizationfunction', 'accesses_list_organizationfunction', 'adherent_list_organizationfunction', 'personnels_list_organizationfunction', 'ca_list_organizationfunction', 'board_list_organizationfunction', 'access_details_organizationfunction', 'organization_function_edit', 'view_from_manager_create_organizationfunction'])]
+    private $departureCause;
+    /**
+     * @var Activity
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Organization\Activity')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['organizationfunction', 'access_details_organizationfunction', 'organization_function_edit'])]
+    private $activity;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => true])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['organizationfunction', 'organization_function_edit'])]
+    private $isMemberSection = true;
+    /**
+     * @var string
+     * @ExportSplitFields({"functionType.mission","startDate","endDate"})
+     */
+    #[Groups(['template'])]
+    private $fullLabelTemplate;
+    /**
+     * Sets id.
+     * 
+     * @param int $id
+     * 
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     * 
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Sets functionType.
+     * 
+     * @param string $functionType
+     * 
+     * @return $this
+     */
+    public function setFunctionType($functionType)
+    {
+        $this->functionType = $functionType;
+
+        return $this;
+    }
+    /**
+     * Get functionType
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\FunctionType
+     */
+    public function getFunctionType()
+    {
+        return $this->functionType;
+    }
+    /**
+     * Sets functionComplement.
+     * 
+     * @param string $functionComplement
+     * 
+     * @return $this
+     */
+    public function setFunctionComplement($functionComplement)
+    {
+        $this->functionComplement = $functionComplement;
+
+        return $this;
+    }
+    /**
+     * Gets functionComplement.
+     * 
+     * @return string
+     */
+    public function getFunctionComplement()
+    {
+        return $this->functionComplement;
+    }
+    /**
+     * Sets departureCause.
+     * 
+     * @param string $departureCause
+     * 
+     * @return $this
+     */
+    public function setDepartureCause($departureCause)
+    {
+        $this->departureCause = $departureCause;
+
+        return $this;
+    }
+    /**
+     * Gets departureCause.
+     * 
+     * @return string
+     */
+    public function getDepartureCause()
+    {
+        return $this->departureCause;
+    }
+    /**
+     * Sets activity.
+     * 
+     * @param Activity $activity
+     * 
+     * @return $this
+     */
+    public function setActivity(Activity $activity = null)
+    {
+        $this->activity = $activity;
+
+        return $this;
+    }
+    /**
+     * Gets activity.
+     * 
+     * @return Activity
+     */
+    public function getActivity()
+    {
+        return $this->activity;
+    }
+    /**
+     * Set access
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $access
+     *
+     * @return OrganizationFunction
+     */
+    public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access)
+    {
+        $this->access = $access;
+
+        return $this;
+    }
+    /**
+     * Get access
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getAccess()
+    {
+        return $this->access;
+    }
+    /**
+     * Sets isMemberSection.
+     *
+     * @param bool $isMemberSection
+     *
+     * @return $this
+     */
+    public function setIsPhysical($isMemberSection)
+    {
+        $this->isMemberSection = $isMemberSection;
+
+        return $this;
+    }
+    /**
+     * Gets isMemberSection.
+     *
+     * @return bool
+     */
+    public function getIsPhysical()
+    {
+        return $this->isMemberSection;
+    }
+    /**
+     * Set isMemberSection
+     *
+     * @param boolean $isMemberSection
+     *
+     * @return OrganizationFunction
+     */
+    public function setIsMemberSection($isMemberSection)
+    {
+        $this->isMemberSection = $isMemberSection;
+
+        return $this;
+    }
+    /**
+     * Get isMemberSection
+     *
+     * @return boolean
+     */
+    public function getIsMemberSection()
+    {
+        return $this->isMemberSection;
+    }
+    /**
+     * @return array
+     * @throws \Exception
+     */
+    public function getFullLabelTemplate()
+    {
+        $startDate = new \DateTime($this->getStartDate());
+
+
+        $fullLabelTemplate = [
+            ['value' => $this->getFunctionType()->getMission(), 'translate' => true],
+            $startDate->format('d-m-Y')
+        ];
+
+        if(!empty($this->getEndDate())){
+            $endDate = new \DateTime($this->getEndDate());
+            $fullLabelTemplate[] = $endDate->format('d-m-Y');
+        }
+
+        return $fullLabelTemplate;
+    }
+}

+ 143 - 0
old/Entity/AccessAndFunction/OrganizationResponsability.php

@@ -0,0 +1,143 @@
+<?php
+
+namespace AppBundle\Entity\AccessAndFunction;
+use AppBundle\Annotation\DefaultField;
+use AppBundle\Entity\Traits\ActivityPeriodTrait;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Responsibilité d'un Access au sein d'une Organization
+ *
+ * @Iri("http://schema.org/OrganizationResponsability")
+ */
+#[ORM\Entity]
+class OrganizationResponsability
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    use ActivityPeriodTrait;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['organizationresponsability', 'access_details'])]
+    private $id;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToOne(targetEntity: 'Access', inversedBy: 'organizationResponsabilities')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['organizationresponsability'])]
+    private $access;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['organizationresponsability', 'access_details_organizationresponsabilities'])]
+    private $responsability;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => true])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['organizationresponsability'])]
+    private $isPhysical = true;
+    /**
+     * Sets id.
+     * 
+     * @param int $id
+     * 
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     * 
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set responsability
+     *
+     * @param string $responsability
+     *
+     * @return OrganizationResponsability
+     */
+    public function setResponsability($responsability)
+    {
+        $this->responsability = $responsability;
+
+        return $this;
+    }
+    /**
+     * Get responsability
+     *
+     * @return string
+     */
+    public function getResponsability()
+    {
+        return $this->responsability;
+    }
+    /**
+     * Set access
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $access
+     *
+     * @return OrganizationResponsability
+     */
+    public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access)
+    {
+        $this->access = $access;
+
+        return $this;
+    }
+    /**
+     * Get access
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getAccess()
+    {
+        return $this->access;
+    }
+    /**
+     * Sets isPhysical.
+     *
+     * @param bool $isPhysical
+     *
+     * @return $this
+     */
+    public function setIsPhysical($isPhysical)
+    {
+        $this->isPhysical = $isPhysical;
+
+        return $this;
+    }
+    /**
+     * Gets isPhysical.
+     *
+     * @return bool
+     */
+    public function getIsPhysical()
+    {
+        return $this->isPhysical;
+    }
+}

+ 221 - 0
old/Entity/AccessAndFunction/PersonalizedList.php

@@ -0,0 +1,221 @@
+<?php
+
+namespace AppBundle\Entity\AccessAndFunction;
+use AppBundle\Annotation\DefaultField;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+/**
+ * Personnalisation d'une liste par un Access
+ *
+ * @Iri("http://schema.org/PersonalizedList")
+ */
+#[ORM\Entity]
+class PersonalizedList
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['personalizedlist'])]
+    private $id;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToOne(targetEntity: 'Access', inversedBy: 'personalizedLists')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['personalizedlist'])]
+    private $access;
+    /**
+     * @var $label
+     */
+    #[ORM\Column(type: 'string', length: 200, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['personalizedlist'])]
+    private $label;
+    /**
+     * @var array
+     */
+    #[ORM\Column(type: 'json_array', nullable: true)]
+    #[Groups(['personalizedlist'])]
+    private $filters;
+    #[ORM\Column(type: 'string', length: 150)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['personalizedlist'])]
+    private $entity;
+    /**
+     * @var array
+     */
+    #[ORM\Column(type: 'json_array', nullable: true)]
+    #[Groups(['personalizedlist'])]
+    private $columns;
+    /**
+     * @var $menuKey
+     */
+    #[ORM\Column(type: 'string', length: 150, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['personalizedlist'])]
+    private $menuKey;
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set filters
+     *
+     * @param array $filters
+     *
+     * @return PersonalizedList
+     */
+    public function setFilters($filters)
+    {
+        $this->filters = $filters;
+
+        return $this;
+    }
+    /**
+     * Get filters
+     *
+     * @return array
+     */
+    public function getFilters()
+    {
+        return $this->filters;
+    }
+    /**
+     * Set columns
+     *
+     * @param array $columns
+     *
+     * @return PersonalizedList
+     */
+    public function setColumns($columns)
+    {
+        $this->columns = $columns;
+
+        return $this;
+    }
+    /**
+     * Get columns
+     *
+     * @return array
+     */
+    public function getColumns()
+    {
+        return $this->columns;
+    }
+    /**
+     * Set access
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $access
+     *
+     * @return PersonalizedList
+     */
+    public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access)
+    {
+        $this->access = $access;
+
+        return $this;
+    }
+    /**
+     * Get access
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getAccess()
+    {
+        return $this->access;
+    }
+    /**
+     * Set menuKey
+     *
+     * @param string $menuKey
+     *
+     * @return PersonalizedList
+     */
+    public function setMenuKey($menuKey)
+    {
+        $this->menuKey = $menuKey;
+
+        return $this;
+    }
+    /**
+     * Get menuKey
+     *
+     * @return string
+     */
+    public function getMenuKey()
+    {
+        return $this->menuKey;
+    }
+    /**
+     * Set label
+     *
+     * @param string $label
+     *
+     * @return PersonalizedList
+     */
+    public function setLabel($label)
+    {
+        $this->label = $label;
+
+        return $this;
+    }
+    /**
+     * Get label
+     *
+     * @return string
+     */
+    public function getLabel()
+    {
+        return $this->label;
+    }
+    /**
+     * Set entity
+     *
+     * @param string $entity
+     *
+     * @return PersonalizedList
+     */
+    public function setEntity($entity)
+    {
+        $this->entity = $entity;
+
+        return $this;
+    }
+    /**
+     * Get entity
+     *
+     * @return string
+     */
+    public function getEntity()
+    {
+        return $this->entity;
+    }
+}

+ 440 - 0
old/Entity/AccessAndFunction/Repository/AccessRepository.php

@@ -0,0 +1,440 @@
+<?php
+
+namespace AppBundle\Entity\AccessAndFunction\Repository;
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\AccessAndFunction\FunctionType;
+use AppBundle\Entity\HasItemQueryBuilderInterface;
+use AppBundle\Entity\Organization\Organization;
+use AppBundle\Entity\Person\Person;
+use AppBundle\Enum\AccessAndFunction\FunctionEnum;
+use AppBundle\Enum\AccessAndFunction\LicenseTypeEnum;
+use AppBundle\Enum\OnlineRegistration\ValidationStateEnum;
+use AppBundle\Services\AccessService;
+use Doctrine\ORM\EntityRepository;
+use Doctrine\ORM\QueryBuilder;
+
+/**
+ * Description of AccessRepository
+ *
+ * @author Sébastien Hupin <sebastien.hupin at gmail.com>
+ */
+class AccessRepository extends EntityRepository implements HasItemQueryBuilderInterface
+{
+
+    /**
+     * @param Person $person
+     * @param bool $ignoreCheckNetworkOrganizationEndDate
+     * @return array
+     * @throws \Exception
+     */
+    public function findValidAccess(\AppBundle\Entity\Person\Person $person, $ignoreCheckNetworkOrganizationEndDate = FALSE, $controleLoginEnabled = true)
+    {
+        $filter = $this->_em->getFilters()->enable('activity_year');
+        $filter->setParameter('disabledFilter', 1);
+
+        $datetime = new \DateTime();
+        $today = $datetime->format('Y-m-d');
+
+        $qb = $this->createQueryBuilder('a');
+
+        $qb
+            ->innerJoin('AppBundle:Organization\Organization', 'o', 'WITH', 'o.id = a.organization')
+            ->innerJoin('AppBundle:Network\NetworkOrganization', 'n', 'WITH', 'o.id = n.organization')
+            ->where('a.person = :person')
+            ->andWhere('n.startDate <= :today')
+            ->setParameter('person', $person)
+            ->setParameter('today', $today)
+           ;
+
+        if($controleLoginEnabled){
+            $qb
+                ->andWhere('a.loginEnabled = :loginEnabled')
+                ->setParameter('loginEnabled', true);
+        }
+
+        if ($ignoreCheckNetworkOrganizationEndDate == FALSE) {
+            $qb
+               ->andWhere('n.endDate >= :today OR n.endDate = :emptydate OR n.endDate IS NULL')
+               ->setParameter('emptydate', '0000-00-00');
+        }
+
+        $result = $qb->getQuery()->getResult();
+        $filter->setParameter('disabledFilter', 0);
+        return $result;
+
+    }
+
+    /**
+     * @param AccessService $access
+     * @return array
+     */
+    public function findValidTeacher(AccessService $access)
+    {
+        $qb = $this->createQueryBuilder('a');
+
+        $qb->innerJoin('a.person', 'person')
+            ->innerJoin('AppBundle:AccessAndFunction\OrganizationFunction', 'o', 'WITH', 'o.access = a.id')
+            ->innerJoin('AppBundle:AccessAndFunction\FunctionType', 'ft', 'WITH', 'o.functionType = ft.id')
+            ->where('ft.mission = :mission')
+            ->andWhere('a.organization = :organization')
+            ->setParameter('organization', $access->getOrganization())
+            ->setParameter('mission', FunctionEnum::TEACHER)
+            ->orderBy('person.name')
+            ;
+
+        return $qb->getQuery()->getResult();
+
+    }
+
+    /**
+     * @param Access $access
+     * @return array
+     */
+    public function doesHaveFunction($accessId, $function)
+    {
+        $qb = $this->createQueryBuilder('a');
+        $qb->innerJoin('a.organizationFunction', 'o')
+            ->innerJoin('o.functionType', 'ft')
+            ->where('ft.mission = :mission')
+            ->andWhere('a.id = :id')
+            ->setParameter('id', $accessId)
+            ->setParameter('mission', $function)
+        ;
+        return count($qb->getQuery()->getResult()) > 0;
+    }
+
+    /**
+     * @param Access $access
+     * @return array
+     */
+    public function doesHeStudentDuringPeriod(Access $access, $startDate, $enDate)
+    {
+        $filter = $this->_em->getFilters()->enable('activity_year');
+        $filter->setParameter('disabledFilter', 1);
+        $qb = $this->createQueryBuilder('a');
+
+        $qb->innerJoin('a.organizationFunction', 'o')
+            ->innerJoin('o.functionType', 'ft')
+            ->where('ft.mission = :mission')
+            ->andWhere('(o.startDate <= :enDate AND (o.endDate >= :startDate  OR  o.endDate IS NULL)) AND ((o.endDate >= :startDate  OR  o.endDate IS NULL) AND o.startDate <= :enDate)')
+            ->andWhere('a.id = :id')
+            ->setParameter('id', $access->getId())
+            ->setParameter('mission', FunctionEnum::STUDENT)
+            ->setParameter('startDate', $startDate)
+            ->setParameter('enDate', $enDate);
+        ;
+
+        $filter->setParameter('disabledFilter', 0);
+        return count($qb->getQuery()->getResult()) > 0;
+    }
+
+    /**
+     * Used by Elastica to transform results to model
+     *
+     * @param string $entityAlias
+     * @return  Doctrine\ORM\QueryBuilder
+     */
+    public function createSearchQueryBuilder($entityAlias)
+    {
+        $qb = $this->createQueryBuilder($entityAlias);
+
+        $qb->select($entityAlias, 'p', 'g')
+            ->innerJoin($entityAlias.'.person', 'p')
+//            ->leftJoin('p.addressPostal', 'a1', 'WITH', "a1.person = p.id AND a1.type = 'ADDRESS_PRINCIPAL'")
+//            ->leftJoin('p.guardians', 'g', 'WITH', 'g.children = p.id  AND g.isPrincipal = 1')
+//            ->leftJoin(
+//                'g.children',
+//                'p2',
+//                'WITH',
+//                'p2.id = g.children'
+//            )//            ->leftJoin('p2.addressPostal', 'a2', 'WITH', "a2.person = p2.id AND a2.type = 'ADDRESS_PRINCIPAL'")
+        ;
+
+        return $qb;
+    }
+
+    public function findDuplicatePhysicalAcces($name,$givenName, Organization $organization)
+    {
+        $qb = $this->createQueryBuilder('a')
+            ->innerJoin(Person::class, 'pers', 'WITH', 'a.person= pers.id')
+            ->andWhere('pers.isPhysical = 1')
+            ->andWhere('pers.givenName=:givenName')
+            ->andWhere('pers.name=:name')
+            ->andWhere('a.organization=:organizationId')
+            ->setParameter(':givenName', $givenName)
+            ->setParameter(':name', $name)
+            ->setParameter(':organizationId', $organization);
+
+        return $qb->getQuery()->getResult();
+    }
+
+    public function findDuplicateMoralAcces(Person $person, Organization $organization)
+    {
+        $qb = $this->createQueryBuilder('a')
+            ->innerJoin(Person::class, 'pers', 'WITH', 'a.person= pers.id')
+            ->andWhere('pers.isPhysical = 0')
+            ->andWhere('pers.name=:name')
+            ->andWhere('a.organization=:organizationId')
+            ->setParameter(':name', $person->getName())
+            ->setParameter(':organizationId', $organization);
+
+        return $qb->getQuery()->getResult();
+    }
+
+    public function createDetailQueryBuilder(array $groups = null): QueryBuilder
+    {
+        if(is_array($groups) && in_array('access_details', $groups)){
+            return $this
+                ->createQueryBuilder('o')
+                ->select('o', 'pe', 'pap', 'af')
+                ->leftJoin('o.person', 'pe')
+                ->leftJoin('pe.personAddressPostal', 'pap')
+                ->leftJoin('o.accessFamily', 'af')
+                ;
+        }
+
+        return $this->createQueryBuilder('o');
+    }
+
+    public function createListQueryBuilder(){
+        return $this
+            ->createQueryBuilder('o')
+            ->select('o', 'person')
+            ->innerJoin('o.person', 'person')
+            ;
+    }
+
+    /**
+     * @param Organization $organization
+     * @param $mission
+     * @return array
+     */
+    public function findByOrganizationAndMission(Organization $organization,$mission)
+    {
+        $datetime = new \DateTime();
+        $today = $datetime->format('Y-m-d');
+
+
+        $qb = $this->createQueryBuilder('a')
+            ->innerJoin(Person::class, 'pers', 'WITH', 'a.person= pers.id')
+            ->andWhere('pers.isPhysical = 1')
+            ->andWhere('a.organization=:organizationId')
+            ->innerJoin('a.organizationFunction', 'ofu')
+            ->innerJoin('ofu.functionType', 'ft')
+            ->andWhere('ft.mission=:mission')
+            ->andWhere('ofu.startDate < :today AND (ofu.endDate >= :today OR  ofu.endDate IS NULL)')
+            ->setParameter('organizationId', $organization)
+            ->setParameter('mission', $mission)
+            ->setParameter('today', $today);
+
+        return $qb->getQuery()->getResult();
+    }
+
+    /**
+     * Retourne tous les accesses possédant une fonctions données d'une organisation
+     * @param $organizationId
+     * @return array
+     */
+    public function findAllAccessesByMission($organizationId, array $functions) {
+
+        $queryBuilder =
+            $this->createQueryBuilder('access');
+
+        $queryBuilder
+            ->select('access, access_wishes, access_billing, access_network_setting, access_communication, access_social')
+            ->innerJoin('access.organization', 'organization')
+            ->innerJoin('access.organizationFunction', 'ofu')
+            ->innerJoin('ofu.functionType', 'ft')
+            ->leftJoin('access.accessWishes', 'access_wishes')
+            ->leftJoin('access.accessBilling', 'access_billing')
+            ->leftJoin('access.accessNetworkSetting', 'access_network_setting')
+            ->leftJoin('access.accessCommunication', 'access_communication')
+            ->leftJoin('access.accessSocial', 'access_social')
+            ->andWhere('ft.mission in (:mission)')
+            ->andWhere('organization.id=:organizationId')
+            ->andWhere('access.newAccess=:newAccess')
+            ->setParameter('newAccess',  false)
+            ->setParameter('organizationId',  $organizationId)
+            ->setParameter('mission',  $functions);
+
+        $query = $queryBuilder->getQuery();
+        $results = $query->getResult();
+
+        return $results;
+    }
+
+    /**
+     * Retourne tous les accesses possédant une fonctions données d'une organisation
+     * @param $organizationId
+     * @return array
+     */
+    public function findAllAccessesByMissionAndWithoutCompletingRegistration($organizationId, array $functions) {
+
+        $queryBuilder =
+            $this->createQueryBuilder('access');
+
+        $queryBuilder
+            ->select('access, access_wishes, access_billing, access_network_setting, access_communication, access_social,access_wish','access_family_wish')
+            ->innerJoin('access.organization', 'organization')
+            ->innerJoin('access.organizationFunction', 'ofu')
+            ->innerJoin('ofu.functionType', 'ft')
+            ->leftJoin('access.accessWishes', 'access_wishes')
+            ->leftJoin('access.accessBilling', 'access_billing')
+            ->leftJoin('access.accessNetworkSetting', 'access_network_setting')
+            ->leftJoin('access.accessCommunication', 'access_communication')
+            ->leftJoin('access.accessSocial', 'access_social')
+            ->leftJoin('access.accessWishes', 'access_wish')
+            ->leftJoin('access_wish.accessFamilyWish', 'access_family_wish')
+            ->andWhere('ft.mission in (:mission)')
+            ->andWhere('organization.id=:organizationId')
+            ->andWhere('access.newAccess=:newAccess')
+            ->andWhere('access_wish.id is NULL OR access_family_wish.registrationCompleted = 0')
+            ->setParameter('newAccess',  false)
+            ->setParameter('organizationId',  $organizationId)
+            ->setParameter('mission',  $functions);
+
+        $query = $queryBuilder->getQuery();
+        $results = $query->getResult();
+
+        return $results;
+    }
+
+    public function findAllAccessesByAccessWishOpenForNewEducation($organizationId) {
+        $currentYear = (new \DateTime())->format('Y');
+
+        $queryBuilder =
+            $this->createQueryBuilder('access');
+
+        $queryBuilder
+            ->select('access')
+            ->innerJoin('access.organization', 'organization')
+            ->leftJoin('access.accessWishes', 'access_wishes')
+            ->andWhere('access_wishes.validationState =:validationState')
+            ->andWhere('organization.id=:organizationId')
+            ->andWhere('(access_wishes.createDate >= :startDate and access_wishes.createDate <= :endDate)')
+            ->setParameter('organizationId',  $organizationId)
+            ->setParameter('validationState',  ValidationStateEnum::OPEN_FOR_EDUCATIONS)
+            ->setParameter('startDate', new \DateTime($currentYear.'-01-01'))
+            ->setParameter('endDate', new \DateTime($currentYear.'-12-31'))
+            ;
+
+        $query = $queryBuilder->getQuery();
+        $results = $query->getResult();
+
+        return $results;
+    }
+
+    /**
+     * Get all students for a teacher
+     * @param Access $teacher
+     * @return Array<Access>
+     */
+    public function findStudent(Access $teacher) {
+
+        $queryBuilder =
+            $this->createQueryBuilder('o');
+
+        $queryBuilder->innerJoin('o.educationStudent', 'es')
+            ->innerJoin('es.teachers', 'teacher')
+            ->andWhere($queryBuilder->expr()->eq('teacher.id', ':teacher'))
+            ->setParameter(':teacher', $teacher);
+
+        $query = $queryBuilder->getQuery();
+        $results = $query->getResult();
+
+        return $results;
+
+    }
+
+    /**
+     * @param Organization $organization
+     * @param $startDate
+     * @param $enDate
+     * @return array
+     */
+    public function findByStudentsByDates(Organization $organization,$startDate,$enDate)
+    {
+        $qb = $this->createQueryBuilder('a')
+            ->innerJoin(Person::class, 'pers', 'WITH', 'a.person= pers.id')
+            ->andWhere('pers.isPhysical = 1')
+            ->andWhere('a.organization=:organizationId')
+            ->innerJoin('a.organizationFunction', 'ofu')
+            ->innerJoin('ofu.functionType', 'ft')
+            ->andWhere('ft.mission=:mission')
+            ->andWhere('(ofu.startDate <= :enDate AND (ofu.endDate >= :startDate  OR  ofu.endDate IS NULL)) AND ((ofu.endDate >= :startDate  OR  ofu.endDate IS NULL) AND ofu.startDate <= :enDate)')
+            ->setParameter('organizationId', $organization)
+            ->setParameter('mission', FunctionEnum::STUDENT)
+            ->setParameter('startDate', $startDate)
+            ->setParameter('enDate', $enDate);
+
+        return $qb->getQuery()->getResult();
+    }
+
+    /**
+     * @param $accessIds
+     * @param $organization
+     * @return array
+     */
+    public function findAccessByIds($accessIds,$organization)
+    {
+        $queryBuilder = $this->createQueryBuilder('o');
+        $queryBuilder
+            ->andWhere(
+                $queryBuilder->expr()->in('o.id', ':ids'))
+            ->andWhere('o.organization=:organizationId')
+            ->setParameter('ids', $accessIds)
+            ->setParameter('organizationId', $organization);
+
+        return $queryBuilder->getQuery()->getResult();
+    }
+
+    public function findAccessWhoAreReEnrolled(Organization $organization){
+        $datetimeNow = new \Datetime('now');
+        $currentYear = $datetimeNow->format('Y');
+        $pastYear = $currentYear-1;
+
+        $filter = $this->_em->getFilters()->enable('activity_year');
+        $filter->setParameter('disabledFilter', 1);
+        $queryBuilder = $this->createQueryBuilder('o');
+        $queryBuilder
+            ->innerJoin('o.educationStudent', 'es')
+            ->andWhere('es.startYear=:pastYear')
+            ->innerJoin('o.educationStudent', 'es2')
+            ->andWhere('es2.startYear=:currentYear')
+            ->andWhere('o.organization=:organizationId');
+        $queryBuilder
+            ->setParameter('pastYear', $pastYear)
+            ->setParameter('currentYear', $currentYear)
+            ->setParameter('organizationId', $organization)
+
+            ->groupBy('o.id');
+
+        $result = $queryBuilder->getQuery()->getResult();
+        $filter->setParameter('disabledFilter', 0);
+        return $result;
+    }
+
+    public function findAccessWhoAreEnrolled(Organization $organization){
+        $datetimeNow = new \Datetime('now');
+        $currentYear = $datetimeNow->format('Y');
+        $pastYear = $currentYear-1;
+
+        $filter = $this->_em->getFilters()->enable('activity_year');
+        $filter->setParameter('disabledFilter', 1);
+        $queryBuilder = $this->createQueryBuilder('o');
+        $queryBuilder
+            ->innerJoin('o.educationStudent', 'es2')
+            ->andWhere('es2.startYear=:currentYear')
+            ->andWhere('o.organization=:organizationId');
+        $queryBuilder
+            ->setParameter('currentYear', $currentYear)
+            ->setParameter('organizationId', $organization)
+
+            ->groupBy('o.id');
+
+        $result = $queryBuilder->getQuery()->getResult();
+        $filter->setParameter('disabledFilter', 0);
+        return $result;
+    }
+}
+

+ 54 - 0
old/Entity/AccessAndFunction/Repository/OrganizationFunctionRepository.php

@@ -0,0 +1,54 @@
+<?php
+
+namespace AppBundle\Entity\AccessAndFunction\Repository;
+use AppBundle\Entity\AccessAndFunction\Access;
+use Doctrine\ORM\EntityRepository;
+
+/**
+ * Description of OrganizationFunctionRepository
+ *
+ */
+class OrganizationFunctionRepository extends EntityRepository
+{
+    /**
+     * @param Access $access
+     * @return array
+     */
+    public function getArchivedOrganizationFunction($enDate, $organizationId)
+    {
+        $filter = $this->_em->getFilters()->enable('activity_year');
+        $filter->setParameter('disabledFilter', 1);
+        $qb = $this->createQueryBuilder('organization_function');
+
+        $qb
+            ->innerJoin('organization_function.access', 'access')
+            ->innerJoin('access.organization', 'organization')
+            ->andWhere('organization_function.endDate = :enDate')
+            ->andWhere('organization.id = :id')
+            ->setParameter('id', $organizationId)
+            ->setParameter('enDate', $enDate)
+        ;
+
+        $filter->setParameter('disabledFilter', 0);
+        return $qb->getQuery()->getResult();
+    }
+
+    public function getAllOrganizationFunctionByAccessAndDates(Access $access,$startDate,$endDate)
+    {
+        $filter = $this->_em->getFilters()->enable('activity_year');
+        $filter->setParameter('disabledFilter', 1);
+        $qb = $this->createQueryBuilder('organization_function');
+
+        $qb
+            ->innerJoin('organization_function.access', 'access')
+            ->andWhere('access.id = :access')
+            ->andWhere('(organization_function.startDate <= :startDate and (organization_function.endDate is null or organization_function.endDate > :startDate)) or (organization_function.startDate > :startDate and organization_function.startDate < :endDate)')
+            ->setParameter('access', $access)
+            ->setParameter('startDate', $startDate)
+            ->setParameter('endDate', $endDate)
+        ;
+
+        $filter->setParameter('disabledFilter', 0);
+        return $qb->getQuery()->getResult();
+    }
+}

+ 223 - 0
old/Entity/AccessWish/AccessFamilyWish.php

@@ -0,0 +1,223 @@
+<?php
+
+namespace AppBundle\Entity\AccessWish;
+
+use AppBundle\Enum\OnlineRegistration\StatusEnum;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use DoctrineExtensions\Query\Mysql\Date;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Access.
+ *
+ * @see http://schema.org/AccessFamilyWish Documentation on Schema.org
+ *
+ * @Iri("http://schema.org/AccessFamilyWish")
+ */
+#[ORM\Entity]
+class AccessFamilyWish
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['accessfamilywish', 'access_familly_onlineregistration', 'online_registration_access_family_accesswishes', 'online_registration_validation_access_family_accesswish', 'online_registration_validation_access_family_accesswishreregistrations', 'accesswish_mail'])]
+    private $id;
+    /**
+     * @var ArrayCollection<AccessWish>
+     */
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\AccessWish\AccessWish', mappedBy: 'accessFamilyWish', cascade: ['remove'])]
+    #[Groups(['accessfamilywish_accesswishes', 'access_familly_onlineregistration', 'online_registration_access_family_accesswishes', 'online_registration_validation_access_family_accesswish', 'online_registration_validation_access_family_accesswishreregistrations', 'accesswish_mail_accessfamilywish'])]
+    private $accessWishes;
+    /**
+     * @var ArrayCollection<AccessWish>
+     */
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\AccessWish\AccessWish', mappedBy: 'accessFamilyWish', cascade: ['remove'], fetch: 'EXTRA_LAZY')]
+    #[Groups(['accessfamilywish_accesswishes', 'education_student_wish_list_accesswishreregistrations', 'education_student_wish_list_accesswish'])]
+    private $accessWishesGuardians;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accessfamilywish', 'access_familly_onlineregistration'])]
+    private $registrationCompleted = false;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'datetime', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['accessfamilywish', 'access_familly_onlineregistration'])]
+    private $registrationCompletedDateTime;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accessfamilywish'])]
+    private $registrationIsValidated = false;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accessfamilywish'])]
+    private $closeRegistration = false;
+    public function __construct()
+    {
+        $this->accessWishes = new ArrayCollection();
+    }
+    /**
+     * Get id
+     *
+     * @return integer
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * @param $registrationCompleted
+     * @return $this
+     * @throws \Exception
+     */
+    public function setRegistrationCompleted($registrationCompleted)
+    {
+        if(!$registrationCompleted)
+            return $this;
+        if(empty($this->getRegistrationCompletedDateTime()))
+            $this->setRegistrationCompletedDateTime(new \DateTime());
+        $this->registrationCompleted = $registrationCompleted;
+
+        return $this;
+    }
+    /**
+     * Get registrationCompleted
+     *
+     * @return boolean
+     */
+    public function getRegistrationCompleted()
+    {
+        return $this->registrationCompleted;
+    }
+    /**
+     * Add accessWish
+     *
+     * @param \AppBundle\Entity\AccessWish\AccessWish $accessWish
+     *
+     * @return AccessFamilyWish
+     */
+    public function addAccessWish(\AppBundle\Entity\AccessWish\AccessWish $accessWish)
+    {
+        $accessWish->setAccessFamilyWish($this);
+        $this->accessWishes[] = $accessWish;
+
+        return $this;
+    }
+    /**
+     * Remove accessWish
+     *
+     * @param \AppBundle\Entity\AccessWish\AccessWish $accessWish
+     */
+    public function removeAccessWish(\AppBundle\Entity\AccessWish\AccessWish $accessWish)
+    {
+        $accessWish->setAccessFamilyWish(null);
+        $this->accessWishes->removeElement($accessWish);
+    }
+    /**
+     * Get accessWishes
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getAccessWishes()
+    {
+        return $this->accessWishes;
+    }
+    public function getAccessWishesGuardians()
+    {
+        $guardians = [];
+        foreach ($this->accessWishes as $accessWish){
+            if($accessWish->getStatus() === StatusEnum::RESPONSIBLE)
+                $guardians[] = $accessWish;
+        }
+        return $guardians;
+    }
+    /**
+     * Set registrationCompletedDateTime
+     *
+     * @param \DateTime $registrationCompletedDateTime
+     *
+     * @return AccessFamilyWish
+     */
+    public function setRegistrationCompletedDateTime($registrationCompletedDateTime)
+    {
+        $this->registrationCompletedDateTime = $registrationCompletedDateTime;
+
+        return $this;
+    }
+    /**
+     * Get registrationCompletedDateTime
+     *
+     * @return \DateTime
+     */
+    public function getRegistrationCompletedDateTime()
+    {
+        return $this->registrationCompletedDateTime;
+    }
+    /**
+     * Set registrationIsValidated
+     *
+     * @param boolean $registrationIsValidated
+     *
+     * @return AccessFamilyWish
+     */
+    public function setRegistrationIsValidated($registrationIsValidated)
+    {
+        $this->registrationIsValidated = $registrationIsValidated;
+
+        return $this;
+    }
+    /**
+     * Get registrationIsValidated
+     *
+     * @return boolean
+     */
+    public function getRegistrationIsValidated()
+    {
+        return $this->registrationIsValidated;
+    }
+    /**
+     * Set closeRegistration
+     *
+     * @param boolean $closeRegistration
+     *
+     * @return AccessFamilyWish
+     */
+    public function setCloseRegistration($closeRegistration)
+    {
+        $this->closeRegistration = $closeRegistration;
+
+        return $this;
+    }
+    /**
+     * Get closeRegistration
+     *
+     * @return boolean
+     */
+    public function getCloseRegistration()
+    {
+        return $this->closeRegistration;
+    }
+}

+ 363 - 0
old/Entity/AccessWish/AccessTmp.php

@@ -0,0 +1,363 @@
+<?php
+
+namespace AppBundle\Entity\AccessWish;
+
+use AppBundle\Entity\Organization\Organization;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Validator\Constraints as Assert;
+
+/**
+ * Contient les access temporaires d'une organisation = les email qui ont fait la procédure signin
+ */
+#[ORM\Entity]
+class AccessTmp
+{
+    use TimestampableEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    private $id;
+    /**
+     * @var Organization
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Organization\Organization')]
+    private $organization;
+    /**
+     * @var string
+     */
+    #[Assert\Type(type: 'string')]
+    #[ORM\Column(type: 'string', nullable: true)]
+    private $mail;
+    /**
+     * @var string
+     */
+    #[Assert\Type(type: 'string')]
+    #[ORM\Column(type: 'string', nullable: true)]
+    private $username;
+    /**
+     * @var string
+     */
+    #[Assert\Type(type: 'string')]
+    #[ORM\Column(type: 'string', nullable: true)]
+    private $password;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 100, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Length(max: 100, maxMessage: 'invalid-max-length')]
+    private $name;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 50, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Length(max: 50, maxMessage: 'invalid-max-length')]
+    private $givenName;
+    /**
+     * @var \DateTime Date of birth.
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date(message: 'invalid-date')]
+    private $birthDate;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    private $informationRetainedAndUsed = false;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    private $cgu = false;
+    /**
+     * Random string sent to the user email address in order to verify it
+     *
+     * @var string
+     */
+    #[ORM\Column(name: 'confirmation_token', type: 'string', nullable: false)]
+    private $confirmationToken;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'datetime', nullable: false)]
+    private $tokenGivenDate;
+    public function __construct()
+    {
+
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Sets organization.
+     *
+     * @param Organization $organization
+     *
+     * @return $this
+     */
+    public function setOrganization(Organization $organization = null)
+    {
+        $this->organization = $organization;
+
+        return $this;
+    }
+    /**
+     * Gets organization.
+     *
+     * @return Organization
+     */
+    public function getOrganization()
+    {
+        return $this->organization;
+    }
+    /**
+     * Sets mail.
+     *
+     * @param string $mail
+     *
+     * @return $this
+     */
+    public function setMail($mail)
+    {
+        $this->mail = $mail;
+
+        return $this;
+    }
+    /**
+     * Gets mail.
+     *
+     * @return string
+     */
+    public function getMail()
+    {
+        return $this->mail;
+    }
+    /**
+     * Sets username.
+     *
+     * @param string $username
+     *
+     * @return $this
+     */
+    public function setUsername($username)
+    {
+        $this->username = $username;
+
+        return $this;
+    }
+    /**
+     * Gets username.
+     *
+     * @return string
+     */
+    public function getUsername()
+    {
+        return $this->username;
+    }
+    /**
+     * Sets password.
+     *
+     * @param string $password
+     *
+     * @return $this
+     */
+    public function setPassword($password)
+    {
+        $this->password = $password;
+
+        return $this;
+    }
+    /**
+     * Gets password.
+     *
+     * @return string
+     */
+    public function getPassword()
+    {
+        return $this->password;
+    }
+    /**
+     * Sets confirmation token.
+     *
+     * @param string $token
+     *
+     * @return $this
+     */
+    public function setConfirmationToken($token)
+    {
+        $this->confirmationToken = $token;
+
+        return $this;
+    }
+    /**
+     * Gets confirmation token.
+     *
+     * @return string
+     */
+    public function getConfirmationToken()
+    {
+        return $this->confirmationToken;
+    }
+    /**
+     * set token given date
+     * @param \DateTime $tokenGivenDate
+     * @return $this
+     */
+    public function setTokenGivenDate(\DateTime $tokenGivenDate)
+    {
+        $this->tokenGivenDate = $tokenGivenDate;
+        return $this;
+    }
+    /**
+     * Gets token given date
+     *
+     * @return \DateTime
+     */
+    public function getTokenGivenDate()
+    {
+        return $this->tokenGivenDate;
+    }
+    public function isTokenNonExpired($ttl)
+    {
+        return $this->getTokenGivenDate() instanceof \DateTime &&
+            $this->getTokenGivenDate()->getTimestamp() + $ttl > time();
+    }
+    /**
+     * Set name
+     *
+     * @param string $name
+     *
+     * @return AccessTmp
+     */
+    public function setName($name)
+    {
+        $this->name = $name;
+
+        return $this;
+    }
+    /**
+     * Get name
+     *
+     * @return string
+     */
+    public function getName()
+    {
+        return $this->name;
+    }
+    /**
+     * Set givenName
+     *
+     * @param string $givenName
+     *
+     * @return AccessTmp
+     */
+    public function setGivenName($givenName)
+    {
+        $this->givenName = $givenName;
+
+        return $this;
+    }
+    /**
+     * Get givenName
+     *
+     * @return string
+     */
+    public function getGivenName()
+    {
+        return $this->givenName;
+    }
+    /**
+     * Set birthDate
+     *
+     * @param \DateTime $birthDate
+     *
+     * @return AccessTmp
+     */
+    public function setBirthDate($birthDate)
+    {
+        $this->birthDate = $birthDate;
+
+        return $this;
+    }
+    /**
+     * Get birthDate
+     *
+     * @return \DateTime
+     */
+    public function getBirthDate()
+    {
+        return $this->birthDate;
+    }
+    /**
+     * Set informationRetainedAndUsed
+     *
+     * @param boolean $informationRetainedAndUsed
+     *
+     * @return AccessTmp
+     */
+    public function setInformationRetainedAndUsed($informationRetainedAndUsed)
+    {
+        $this->informationRetainedAndUsed = $informationRetainedAndUsed;
+
+        return $this;
+    }
+    /**
+     * Get informationRetainedAndUsed
+     *
+     * @return boolean
+     */
+    public function getInformationRetainedAndUsed()
+    {
+        return $this->informationRetainedAndUsed;
+    }
+    /**
+     * Set cgu
+     *
+     * @param boolean $cgu
+     *
+     * @return AccessTmp
+     */
+    public function setCgu($cgu)
+    {
+        $this->cgu = $cgu;
+
+        return $this;
+    }
+    /**
+     * Get cgu
+     *
+     * @return boolean
+     */
+    public function getCgu()
+    {
+        return $this->cgu;
+    }
+}

+ 1306 - 0
old/Entity/AccessWish/AccessWish.php

@@ -0,0 +1,1306 @@
+<?php
+
+namespace AppBundle\Entity\AccessWish;
+
+use AppBundle\Annotation\DefaultField;
+use AppBundle\Annotation\ExportSplitFields;
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Core\Country;
+use AppBundle\Entity\Core\File;
+use AppBundle\Entity\Core\Tagg;
+use AppBundle\Entity\Organization\Organization;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use DoctrineExtensions\Query\Mysql\Date;
+use Dunglas\ApiBundle\Annotation\Iri;
+use libphonenumber\PhoneNumberUtil;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Misd\PhoneNumberBundle\Validator\Constraints\PhoneNumber as AssertPhoneNumber;
+use AppBundle\Validator\Constraints as OpentalentAssert;
+
+/**
+ * Access.
+ *
+ * @see http://schema.org/Access Documentation on Schema.org
+ *
+ * @Iri("http://schema.org/AccessWish")
+ */
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\AccessWish\Repository\AccessWishRepository')]
+class AccessWish
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['accesswish', 'education_student_wish_list', 'online_registration_access_details', 'online_registration_access_family', 'online_registration_validation_access_family', 'online_registration_validation', 'accesswish_mail'])]
+    private $id;
+    /**
+     * @var Organization
+     *
+     * @DefaultField
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Organization\Organization')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['accesswish'])]
+    private $organization;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'accessWishes', cascade: ['persist'])]
+    #[ORM\JoinColumn(onDelete: 'CASCADE')]
+    #[Groups(['accesswish', 'online_registration_access_family_accesswishes', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations', 'online_registration_validation'])]
+    private $accessOriginal;
+    /**
+     * @var AccessFamilyWish
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessWish\AccessFamilyWish', inversedBy: 'accessWishes')]
+    #[Groups(['accesswish_accessfamilywish', 'online_registration_access_family_accesswishes', 'online_registration_validation_access_family_accesswish', 'online_registration_validation_access_family_accesswishreregistrations', 'accesswish_mail', 'education_student_wish_list_accesswishreregistrations', 'education_student_wish_list_accesswish'])]
+    private $accessFamilyWish;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\OnlineRegistration\StatusEnum', 'toArray'], message: 'invalid-choice')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation', 'accesswish_mail_accessfamilywish'])]
+    private $status;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accesswish', 'online_registration'])]
+    private $isNewMemberFamily = false;
+    /**
+     * @var string
+     *
+     * @Iri("https://schema.org/givenName")
+     */
+    #[ORM\Column(type: 'string', length: 50, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Length(max: 50, maxMessage: 'invalid-max-length')]
+    #[Groups(['accesswish', 'online_registration', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations', 'online_registration_validation', 'education_student_wish_list_accesswishreregistrations'])]
+    private $givenName;
+    /**
+     * @var string
+     *
+     * @Iri("https://schema.org/name")
+     */
+    #[ORM\Column(type: 'string', length: 100, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Length(max: 100, maxMessage: 'invalid-max-length')]
+    #[Groups(['accesswish', 'online_registration', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations', 'online_registration_validation', 'education_student_wish_list_accesswishreregistrations'])]
+    private $name;
+    /**
+     * @var File
+     *
+     * @Iri("https://schema.org/image")
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Core\File')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $image;
+    /**
+     * @var \DateTime Date of birth.
+     *
+     * @Iri("https://schema.org/birthDate")
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date(message: 'invalid-date')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations'])]
+    private $birthDate;
+    /**
+     * @var int
+     */
+    #[Groups(['template', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations'])]
+    protected $ageTemplate;
+    /**
+     * @var string Gender of the person.
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Person\GenderEnum', 'toArray'], message: 'invalid-choice')]
+    #[Groups(['accesswish', 'online_registration', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations', 'online_registration_validation'])]
+    private $genderEnum;
+    /**
+     * @var string Email address.
+     *
+     * @Iri("https://schema.org/email")
+     */
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Assert\Email(strict: true, message: 'invalid-email-format')]
+    #[Assert\Email(checkMX: true, message: 'invalid-email-domain')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation', 'accesswish_mail', 'accesswish_mail_accessfamilywish', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations'])]
+    private $email;
+    /**
+     * @var string
+     *
+     * @AssertPhoneNumber
+     */
+    #[ORM\Column(type: 'phone_number', nullable: true)]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations'])]
+    private $telphone;
+    /**
+     * @var string
+     *
+     * @AssertPhoneNumber
+     */
+    #[ORM\Column(type: 'phone_number', nullable: true)]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation', 'education_student_wish_list_accesswish', 'education_student_wish_list_accesswishreregistrations'])]
+    private $mobilPhone;
+    /**
+     * @var Country
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Core\Country')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $addressCountry;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 100, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Length(max: 100, maxMessage: 'invalid-max-length')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $addressCity;
+    /**
+     * @var string
+     *
+     * @OpentalentAssert\PostalCode
+     */
+    #[ORM\Column(type: 'string', length: 20, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $postalCode;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $streetAddress;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $streetAddressSecond;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $streetAddressThird;
+    /**
+     * @var ArrayCollection<EducationStudentWish>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\AccessWish\EducationStudentWish', mappedBy: 'accessWish', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['accesswish_educationstudentwish', 'online_registration', 'online_registration_validation'])]
+    private $educationStudentWishes;
+    /**
+     * @var ArrayCollection<EducationStudentWish>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\AccessWish\EducationStudentWish', mappedBy: 'accessWishReregistrations', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['accesswish_educationstudentwish', 'online_registration', 'online_registration_validation'])]
+    private $educationStudentReregistrationsWishes;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $profession;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => true])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $imageRight = true;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $medicalComments;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $notes;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $establishmentName;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $cityName;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $disponibility;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $className;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $teacherName;
+    /**
+     * @var ArrayCollection<EducationStudentWish>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\AccessWish\DocumentWish', mappedBy: 'accessWish', cascade: ['persist'])]
+    #[Groups(['accesswish_documentwish', 'online_registration', 'online_registration_validation'])]
+    private $documentWishes;
+    /**
+     * @var string
+     *
+     * @ExportSplitFields({"name","givenName"})
+     */
+    #[Groups(['accesswish'])]
+    private $fullNameTemplate;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => true])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    private $synchro = false;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $approveRulesProcedureWish = false;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $receiveInformationsFromOrganizationWish = false;
+    /**
+     * @var ArrayCollection<Tagg>
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\Tagg', cascade: ['persist'], inversedBy: 'accessWishes')]
+    #[Assert\Valid]
+    #[ORM\JoinTable(name: 'tag_accessWish', joinColumns: [], inverseJoinColumns: [])]
+    #[ORM\JoinColumn(name: 'accessWish_id', referencedColumnName: 'id')]
+    #[ORM\JoinColumn(name: 'tag_id', referencedColumnName: 'id')]
+    #[Groups(['accesswish_tags', 'manage_tags'])]
+    private $tags;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', options: ['default' => 'OPEN'])]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\OnlineRegistration\ValidationStateEnum', 'toArray'], message: 'invalid-choice')]
+    #[Groups(['accesswish', 'online_registration_validation'])]
+    private $validationState = "OPEN";
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accesswish', 'online_registration', 'online_registration_validation'])]
+    private $isValidated = false;
+    /**
+     * @var string
+     * @ExportSplitFields({"gender","name","givenName","email","telphone","mobilPhone","addressCity","postalCode","streetAddress"})
+     */
+    #[Groups(['education_student_wish_list_accesswishreregistrations', 'education_student_wish_list_accesswish'])]
+    private $fullNameAndContactTemplate;
+    public function __construct()
+    {
+        $this->educationStudentWishes = new ArrayCollection();
+        $this->educationStudentReregistrationsWishes = new ArrayCollection();
+        $this->documentWishes = new ArrayCollection();
+        $this->tags = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Get id
+     *
+     * @return integer
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set organization
+     *
+     * @param \AppBundle\Entity\Organization\Organization $organization
+     *
+     * @return AccessWish
+     */
+    public function setOrganization(\AppBundle\Entity\Organization\Organization $organization)
+    {
+        $this->organization = $organization;
+
+        return $this;
+    }
+    /**
+     * Get organization
+     *
+     * @return \AppBundle\Entity\Organization\Organization
+     */
+    public function getOrganization()
+    {
+        return $this->organization;
+    }
+    /**
+     * Set givenName
+     *
+     * @param string $givenName
+     *
+     * @return AccessWish
+     */
+    public function setGivenName($givenName)
+    {
+        $this->givenName = $givenName;
+
+        return $this;
+    }
+    /**
+     * Get givenName
+     *
+     * @return string
+     */
+    public function getGivenName()
+    {
+        return $this->givenName;
+    }
+    /**
+     * Sets name.
+     *
+     * @param string $name
+     *
+     * @return $this
+     */
+    public function setName($name)
+    {
+        $this->name = strtoupper($name);
+
+        return $this;
+    }
+    /**
+     * Get name
+     *
+     * @return string
+     */
+    public function getName()
+    {
+        return $this->name;
+    }
+    /**
+     * Set birthDate
+     *
+     * @param \DateTime $birthDate
+     *
+     * @return AccessWish
+     */
+    public function setBirthDate($birthDate)
+    {
+        $this->birthDate = $birthDate;
+
+        return $this;
+    }
+    /**
+     * Get birthDate
+     *
+     * @return \DateTime
+     */
+    public function getBirthDate()
+    {
+        return $this->birthDate ? $this->birthDate->format('Y-m-d') : $this->birthDate;
+    }
+    /**
+     * Set genderEnum
+     *
+     * @param string $genderEnum
+     *
+     * @return AccessWish
+     */
+    public function setGenderEnum($genderEnum)
+    {
+        $this->genderEnum = $genderEnum;
+
+        return $this;
+    }
+    /**
+     * Get genderEnum
+     *
+     * @return string
+     */
+    public function getGenderEnum()
+    {
+        return $this->genderEnum;
+    }
+    /**
+     * Set email
+     *
+     * @param string $email
+     *
+     * @return AccessWish
+     */
+    public function setEmail($email)
+    {
+        $this->email = $email;
+
+        return $this;
+    }
+    /**
+     * Get email
+     *
+     * @return string
+     */
+    public function getEmail()
+    {
+        return $this->email;
+    }
+    /**
+     * Sets telphone.
+     *
+     * @param string $telphone
+     *
+     * @return $this
+     */
+    public function setTelphone($telphone)
+    {
+        if(empty($telphone))$telphone = null;
+
+        if(is_null($telphone)) $this->telphone = $telphone;
+        else{
+            $phoneUtil = PhoneNumberUtil::getInstance();
+            $phoneNumber = $phoneUtil->parse($telphone, PhoneNumberUtil::UNKNOWN_REGION);
+            $this->telphone = $phoneNumber;
+        }
+
+        return $this;
+    }
+    public function setPhoneNumberTelphone($phoneNumberTelphone)
+    {
+        $this->telphone = $phoneNumberTelphone;
+    }
+    /**
+     * Get telphone
+     *
+     * @return phone_number
+     */
+    public function getTelphone()
+    {
+        return $this->telphone;
+    }
+    /**
+     * Sets mobilPhone.
+     *
+     * @param string $mobilPhone
+     *
+     * @return $this
+     */
+    public function setMobilPhone($mobilPhone)
+    {
+        if(empty($mobilPhone))$mobilPhone = null;
+
+        if(is_null($mobilPhone)) $this->mobilPhone = $mobilPhone;
+        else{
+            $phoneUtil = PhoneNumberUtil::getInstance();
+            $phoneNumber = $phoneUtil->parse($mobilPhone, PhoneNumberUtil::UNKNOWN_REGION);
+            $this->mobilPhone = $phoneNumber;
+        }
+
+        return $this;
+    }
+    public function setPhoneNumberMobilPhone($phoneNumberMobilPhone){
+        $this->mobilPhone = $phoneNumberMobilPhone;
+    }
+    /**
+     * Get mobilPhone
+     *
+     * @return phone_number
+     */
+    public function getMobilPhone()
+    {
+        return $this->mobilPhone;
+    }
+    /**
+     * Set addressCity
+     *
+     * @param string $addressCity
+     *
+     * @return AccessWish
+     */
+    public function setAddressCity($addressCity)
+    {
+        $this->addressCity = $addressCity;
+
+        return $this;
+    }
+    /**
+     * Get addressCity
+     *
+     * @return string
+     */
+    public function getAddressCity()
+    {
+        return $this->addressCity;
+    }
+    /**
+     * Set postalCode
+     *
+     * @param string $postalCode
+     *
+     * @return AccessWish
+     */
+    public function setPostalCode($postalCode)
+    {
+        $this->postalCode = $postalCode;
+
+        return $this;
+    }
+    /**
+     * Get postalCode
+     *
+     * @return string
+     */
+    public function getPostalCode()
+    {
+        return $this->postalCode;
+    }
+    /**
+     * Set streetAddress
+     *
+     * @param string $streetAddress
+     *
+     * @return AccessWish
+     */
+    public function setStreetAddress($streetAddress)
+    {
+        $this->streetAddress = $streetAddress;
+
+        return $this;
+    }
+    /**
+     * Get streetAddress
+     *
+     * @return string
+     */
+    public function getStreetAddress()
+    {
+        return $this->streetAddress;
+    }
+    /**
+     * Set streetAddressSecond
+     *
+     * @param string $streetAddressSecond
+     *
+     * @return AccessWish
+     */
+    public function setStreetAddressSecond($streetAddressSecond)
+    {
+        $this->streetAddressSecond = $streetAddressSecond;
+
+        return $this;
+    }
+    /**
+     * Get streetAddressSecond
+     *
+     * @return string
+     */
+    public function getStreetAddressSecond()
+    {
+        return $this->streetAddressSecond;
+    }
+    /**
+     * Set streetAddressThird
+     *
+     * @param string $streetAddressThird
+     *
+     * @return AccessWish
+     */
+    public function setStreetAddressThird($streetAddressThird)
+    {
+        $this->streetAddressThird = $streetAddressThird;
+
+        return $this;
+    }
+    /**
+     * Get streetAddressThird
+     *
+     * @return string
+     */
+    public function getStreetAddressThird()
+    {
+        return $this->streetAddressThird;
+    }
+    /**
+     * Set image
+     *
+     * @param \AppBundle\Entity\Core\File $image
+     *
+     * @return AccessWish
+     */
+    public function setImage(\AppBundle\Entity\Core\File $image = null)
+    {
+        $this->image = $image;
+
+        return $this;
+    }
+    /**
+     * Get image
+     *
+     * @return \AppBundle\Entity\Core\File
+     */
+    public function getImage()
+    {
+        return $this->image;
+    }
+    /**
+     * Set addressCountry
+     *
+     * @param \AppBundle\Entity\Core\Country $addressCountry
+     *
+     * @return AccessWish
+     */
+    public function setAddressCountry(\AppBundle\Entity\Core\Country $addressCountry = null)
+    {
+        $this->addressCountry = $addressCountry;
+
+        return $this;
+    }
+    /**
+     * Get addressCountry
+     *
+     * @return \AppBundle\Entity\AccessWish\Country
+     */
+    public function getAddressCountry()
+    {
+        return $this->addressCountry;
+    }
+    /**
+     * Add educationStudentWish
+     *
+     * @param \AppBundle\Entity\AccessWish\EducationStudentWish $educationStudentWish
+     *
+     * @return AccessWish
+     */
+    public function addEducationStudentWish(\AppBundle\Entity\AccessWish\EducationStudentWish $educationStudentWish)
+    {
+        $educationStudentWish->setAccessWish($this);
+        $this->educationStudentWishes[] = $educationStudentWish;
+
+        return $this;
+    }
+    /**
+     * Remove educationStudentWish
+     *
+     * @param \AppBundle\Entity\AccessWish\EducationStudentWish $educationStudentWish
+     */
+    public function removeEducationStudentWish(\AppBundle\Entity\AccessWish\EducationStudentWish $educationStudentWish)
+    {
+        $this->educationStudentWishes->removeElement($educationStudentWish);
+    }
+    /**
+     * Get educationStudentWishes
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getEducationStudentWishes()
+    {
+        return $this->educationStudentWishes;
+    }
+    /**
+     * Set imageRight
+     *
+     * @param boolean $imageRight
+     *
+     * @return AccessWish
+     */
+    public function setImageRight($imageRight)
+    {
+        $this->imageRight = $imageRight;
+
+        return $this;
+    }
+    /**
+     * Get imageRight
+     *
+     * @return boolean
+     */
+    public function getImageRight()
+    {
+        return $this->imageRight;
+    }
+    /**
+     * Set medicalComments
+     *
+     * @param string $medicalComments
+     *
+     * @return AccessWish
+     */
+    public function setMedicalComments($medicalComments)
+    {
+        $this->medicalComments = $medicalComments;
+
+        return $this;
+    }
+    /**
+     * Get medicalComments
+     *
+     * @return string
+     */
+    public function getMedicalComments()
+    {
+        return $this->medicalComments;
+    }
+    /**
+     * Set notes
+     *
+     * @param string $notes
+     *
+     * @return AccessWish
+     */
+    public function setNotes($notes)
+    {
+        $this->notes = $notes;
+
+        return $this;
+    }
+    /**
+     * Get notes
+     *
+     * @return string
+     */
+    public function getNotes()
+    {
+        return $this->notes;
+    }
+    /**
+     * Set profession
+     *
+     * @param string $profession
+     *
+     * @return AccessWish
+     */
+    public function setProfession($profession)
+    {
+        $this->profession = $profession;
+
+        return $this;
+    }
+    /**
+     * Get profession
+     *
+     * @return string
+     */
+    public function getProfession()
+    {
+        return $this->profession;
+    }
+    /**
+     * Set establishmentName
+     *
+     * @param string $establishmentName
+     *
+     * @return AccessWish
+     */
+    public function setEstablishmentName($establishmentName)
+    {
+        $this->establishmentName = $establishmentName;
+
+        return $this;
+    }
+    /**
+     * Get establishmentName
+     *
+     * @return string
+     */
+    public function getEstablishmentName()
+    {
+        return $this->establishmentName;
+    }
+    /**
+     * Set cityName
+     *
+     * @param string $cityName
+     *
+     * @return AccessWish
+     */
+    public function setCityName($cityName)
+    {
+        $this->cityName = $cityName;
+
+        return $this;
+    }
+    /**
+     * Get cityName
+     *
+     * @return string
+     */
+    public function getCityName()
+    {
+        return $this->cityName;
+    }
+    /**
+     * Set disponibility
+     *
+     * @param string $disponibility
+     *
+     * @return AccessWish
+     */
+    public function setDisponibility($disponibility)
+    {
+        $this->disponibility = $disponibility;
+
+        return $this;
+    }
+    /**
+     * Get disponibility
+     *
+     * @return string
+     */
+    public function getDisponibility()
+    {
+        return $this->disponibility;
+    }
+    /**
+     * Set className
+     *
+     * @param string $className
+     *
+     * @return AccessWish
+     */
+    public function setClassName($className)
+    {
+        $this->className = $className;
+
+        return $this;
+    }
+    /**
+     * Get className
+     *
+     * @return string
+     */
+    public function getClassName()
+    {
+        return $this->className;
+    }
+    /**
+     * Set teacherName
+     *
+     * @param string $teacherName
+     *
+     * @return AccessWish
+     */
+    public function setTeacherName($teacherName)
+    {
+        $this->teacherName = $teacherName;
+
+        return $this;
+    }
+    /**
+     * Get teacher
+     *
+     * @return string
+     */
+    public function getTeacherName()
+    {
+        return $this->teacherName;
+    }
+    /**
+     * Add documentWish
+     *
+     * @param \AppBundle\Entity\AccessWish\DocumentWish $documentWish
+     *
+     * @return AccessWish
+     */
+    public function addDocumentWish(\AppBundle\Entity\AccessWish\DocumentWish $documentWish)
+    {
+        $documentWish->setAccessWish($this);
+        $this->documentWishes[] = $documentWish;
+
+        return $this;
+    }
+    /**
+     * Remove documentWish
+     *
+     * @param \AppBundle\Entity\AccessWish\DocumentWish $documentWish
+     */
+    public function removeDocumentWish(\AppBundle\Entity\AccessWish\DocumentWish $documentWish)
+    {
+        $this->documentWishes->removeElement($documentWish);
+    }
+    /**
+     * Get documentWishes
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getDocumentWishes()
+    {
+        return $this->documentWishes;
+    }
+    /**
+     * Gets full name.
+     *
+     * @return string
+     */
+    public function getFullNameTemplate()
+    {
+        return $this->getName() . ' ' . $this->getGivenName();
+    }
+    /**
+     * Set accessOriginal
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $accessOriginal
+     *
+     * @return AccessWish
+     */
+    public function setAccessOriginal(\AppBundle\Entity\AccessAndFunction\Access $accessOriginal = null)
+    {
+        $this->accessOriginal = $accessOriginal;
+
+        return $this;
+    }
+    /**
+     * Get accessOriginal
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getAccessOriginal()
+    {
+        return $this->accessOriginal;
+    }
+    /**
+     * Set accessFamilyWish
+     *
+     * @param \AppBundle\Entity\AccessWish\AccessFamilyWish $accessFamilyWish
+     *
+     * @return AccessWish
+     */
+    public function setAccessFamilyWish(\AppBundle\Entity\AccessWish\AccessFamilyWish $accessFamilyWish = null)
+    {
+        $this->accessFamilyWish = $accessFamilyWish;
+
+        return $this;
+    }
+    /**
+     * Get accessFamilyWish
+     *
+     * @return \AppBundle\Entity\AccessWish\AccessFamilyWish
+     */
+    public function getAccessFamilyWish()
+    {
+        return $this->accessFamilyWish;
+    }
+    /**
+     * Set status
+     *
+     * @param string $status
+     *
+     * @return AccessWish
+     */
+    public function setStatus($status)
+    {
+        $this->status = $status;
+
+        return $this;
+    }
+    /**
+     * Get status
+     *
+     * @return string
+     */
+    public function getStatus()
+    {
+        return $this->status;
+    }
+    /**
+     * Add educationStudentReregistrationsWish
+     *
+     * @param \AppBundle\Entity\AccessWish\EducationStudentWish $educationStudentReregistrationsWish
+     *
+     * @return AccessWish
+     */
+    public function addEducationStudentReregistrationsWish(\AppBundle\Entity\AccessWish\EducationStudentWish $educationStudentReregistrationsWish)
+    {
+        $educationStudentReregistrationsWish->setAccessWishReregistrations($this);
+        $this->educationStudentReregistrationsWishes[] = $educationStudentReregistrationsWish;
+
+        return $this;
+    }
+    /**
+     * Remove educationStudentReregistrationsWish
+     *
+     * @param \AppBundle\Entity\AccessWish\EducationStudentWish $educationStudentReregistrationsWish
+     */
+    public function removeEducationStudentReregistrationsWish(\AppBundle\Entity\AccessWish\EducationStudentWish $educationStudentReregistrationsWish)
+    {
+        $this->educationStudentReregistrationsWishes->removeElement($educationStudentReregistrationsWish);
+    }
+    /**
+     * Get educationStudentReregistrationsWishes
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getEducationStudentReregistrationsWishes()
+    {
+        return $this->educationStudentReregistrationsWishes;
+    }
+    /**
+     * Set synchro
+     *
+     * @param boolean $synchro
+     *
+     * @return AccessWish
+     */
+    public function setSynchro($synchro)
+    {
+        $this->synchro = $synchro;
+
+        return $this;
+    }
+    /**
+     * Get synchro
+     *
+     * @return boolean
+     */
+    public function getSynchro()
+    {
+        return $this->synchro;
+    }
+    /**
+     * Set approveRulesProcedureWish
+     *
+     * @param boolean $approveRulesProcedureWish
+     *
+     * @return AccessWish
+     */
+    public function setApproveRulesProcedureWish($approveRulesProcedureWish)
+    {
+        $this->approveRulesProcedureWish = $approveRulesProcedureWish;
+
+        return $this;
+    }
+    /**
+     * Get approveRulesProcedureWish
+     *
+     * @return boolean
+     */
+    public function getApproveRulesProcedureWish()
+    {
+        return $this->approveRulesProcedureWish;
+    }
+    /**
+     * Set receiveInformationsFromOrganizationWish
+     *
+     * @param boolean $receiveInformationsFromOrganizationWish
+     *
+     * @return AccessWish
+     */
+    public function setReceiveInformationsFromOrganizationWish($receiveInformationsFromOrganizationWish)
+    {
+        $this->receiveInformationsFromOrganizationWish = $receiveInformationsFromOrganizationWish;
+
+        return $this;
+    }
+    /**
+     * Get receiveInformationsFromOrganizationWish
+     *
+     * @return boolean
+     */
+    public function getReceiveInformationsFromOrganizationWish()
+    {
+        return $this->receiveInformationsFromOrganizationWish;
+    }
+    /**
+     * Set isNewMemberFamily
+     *
+     * @param boolean $isNewMemberFamily
+     *
+     * @return AccessWish
+     */
+    public function setIsNewMemberFamily($isNewMemberFamily)
+    {
+        $this->isNewMemberFamily = $isNewMemberFamily;
+
+        return $this;
+    }
+    /**
+     * Get isNewMemberFamily
+     *
+     * @return boolean
+     */
+    public function getIsNewMemberFamily()
+    {
+        return $this->isNewMemberFamily;
+    }
+    /**
+     * Add tag
+     *
+     * @param \AppBundle\Entity\Core\Tagg $tag
+     *
+     * @return AccessWish
+     */
+    public function addTag(\AppBundle\Entity\Core\Tagg $tag)
+    {
+        $this->tags[] = $tag;
+
+        return $this;
+    }
+    /**
+     * Remove tag
+     *
+     * @param \AppBundle\Entity\Core\Tagg $tag
+     */
+    public function removeTag(\AppBundle\Entity\Core\Tagg $tag)
+    {
+        $this->tags->removeElement($tag);
+    }
+    /**
+     * Get tags
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getTags()
+    {
+        return $this->tags;
+    }
+    public function getAgeTemplate()
+    {
+        $from = new \DateTime($this->getBirthDate());
+        $to = new \DateTime('today');
+        $age = $from->diff($to)->y;
+        return $age > 0 ? $age : null;
+    }
+    /**
+     * Gets full name.
+     *
+     * @return array
+     */
+    public function getFullNameAndContactTemplate()
+    {
+        if(!empty($this->getGenderEnum())){
+            $fullNameAndContactTemplate[] = [ 'value' => $this->getGenderEnum(), 'translate' => true ];
+            $fullNameAndContactTemplate[] = ' - ';
+        }
+
+        $fullNameAndContactTemplate[] = $this->getFullNameTemplate();
+
+        if(!empty($this->getEmail()) || !empty($this->getTelphone()) || !empty($this->getMobilPhone())){
+            $fullNameAndContactTemplate[] = ' - ';
+            if(!empty($this->getEmail()))
+                $fullNameAndContactTemplate[] = $this->getEmail();
+            if(!empty($this->getTelphone()))
+                $fullNameAndContactTemplate[] =  ['type' => 'phone_number', 'value' => $this->getTelphone(), 'separator' => ' / '];
+            if(!empty($this->getMobilPhone()))
+                $fullNameAndContactTemplate[] = ['type' => 'phone_number', 'value' => $this->getMobilPhone(), 'separator' => ' / '];
+        }
+
+        if(!empty($this->getStreetAddress()) || !empty($this->getCityName())){
+            $fullNameAndContactTemplate[] = ' - ';
+            if(!empty($this->getStreetAddress()))
+                $fullNameAndContactTemplate[] = $this->getStreetAddress();
+            if(!empty($this->getPostalCode()))
+                $fullNameAndContactTemplate[] = $this->getPostalCode();
+            if(!empty($this->getCityName()))
+                $fullNameAndContactTemplate[] = $this->getCityName();
+        }
+
+        return $fullNameAndContactTemplate;
+    }
+    /**
+     * Set validationState
+     *
+     * @param string $validationState
+     *
+     * @return AccessWish
+     */
+    public function setValidationState($validationState)
+    {
+        $this->validationState = $validationState;
+
+        return $this;
+    }
+    /**
+     * Get validationState
+     *
+     * @return string
+     */
+    public function getValidationState()
+    {
+        return $this->validationState;
+    }
+    /**
+     * Set isValidated
+     *
+     * @param boolean $isValidated
+     *
+     * @return AccessWish
+     */
+    public function setIsValidated($isValidated)
+    {
+        $this->isValidated = $isValidated;
+
+        return $this;
+    }
+    /**
+     * Get isValidated
+     *
+     * @return boolean
+     */
+    public function getIsValidated()
+    {
+        return $this->isValidated;
+    }
+}

+ 282 - 0
old/Entity/AccessWish/DocumentWish.php

@@ -0,0 +1,282 @@
+<?php
+
+namespace AppBundle\Entity\AccessWish;
+
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Finite\StatefulInterface;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * DocumentWish.
+ *
+ * @see http://schema.org/DocumentWish Documentation on Schema.org
+ *
+ * @Iri("http://schema.org/DocumentWish")
+ */
+#[ORM\Entity]
+class DocumentWish
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['documentwish', 'online_registration', 'online_registration_validation', 'student_registration_person'])]
+    private $id;
+    /**
+     * @var AccessWish
+     *
+     *
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessWish\AccessWish', inversedBy: 'documentWishes')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['documentwish'])]
+    private $accessWish;
+    /**
+     * @var AccessWish
+     *
+     *
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Person\Person', inversedBy: 'documentWishes')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['documentwish'])]
+    private $personOwner;
+    /**
+     * @var ArrayCollection<AppBundle\Entity\Core\File>.
+     */
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Core\File', mappedBy: 'documentWish', orphanRemoval: true)]
+    #[Groups(['documentwish', 'online_registration_documentwishes', 'online_registration_validation_documentwishes', 'access_files_person', 'student_registration_person'])]
+    private $files;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['documentwish', 'online_registration_documentwishes', 'online_registration_validation_documentwishes', 'access_files_person', 'student_registration_person'])]
+    private $label;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\OnlineRegistration\FileTypeEnum', 'toArray'], message: 'invalid-choice')]
+    #[Groups(['documentwish', 'online_registration_documentwishes', 'online_registration_validation_documentwishes', 'access_files_person', 'student_registration_person'])]
+    private $type;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['documentwish', 'online_registration_documentwishes', 'online_registration_validation_documentwishes', 'access_files_person', 'student_registration_person'])]
+    private $description;
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+        $this->files = new ArrayCollection();
+    }
+    /**
+     * Get id
+     *
+     * @return integer
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set days
+     *
+     * @param array $days
+     *
+     * @return EducationStudentWish
+     */
+    public function setDays($days)
+    {
+        $this->days = $days;
+
+        return $this;
+    }
+    /**
+     * Get days
+     *
+     * @return array
+     */
+    public function getDays()
+    {
+        return $this->days;
+    }
+    /**
+     * Set education
+     *
+     * @param \AppBundle\Entity\Education\Education $education
+     *
+     * @return EducationStudentWish
+     */
+    public function setEducation(\AppBundle\Entity\Education\Education $education = null)
+    {
+        $this->education = $education;
+
+        return $this;
+    }
+    /**
+     * Get education
+     *
+     * @return \AppBundle\Entity\Education\Education
+     */
+    public function getEducation()
+    {
+        return $this->education;
+    }
+    /**
+     * Set accessWish
+     *
+     * @param \AppBundle\Entity\AccessWish\AccessWish $accessWish
+     *
+     * @return EducationStudentWish
+     */
+    public function setAccessWish(\AppBundle\Entity\AccessWish\AccessWish $accessWish = null)
+    {
+        $this->accessWish = $accessWish;
+
+        return $this;
+    }
+    /**
+     * Get accessWish
+     *
+     * @return \AppBundle\Entity\AccessWish\AccessWish
+     */
+    public function getAccessWish()
+    {
+        return $this->accessWish;
+    }
+    /**
+     * Set label
+     *
+     * @param string $label
+     *
+     * @return DocumentWish
+     */
+    public function setLabel($label)
+    {
+        $this->label = $label;
+
+        return $this;
+    }
+    /**
+     * Get label
+     *
+     * @return string
+     */
+    public function getLabel()
+    {
+        return $this->label;
+    }
+    /**
+     * Set type
+     *
+     * @param string $type
+     *
+     * @return DocumentWish
+     */
+    public function setType($type)
+    {
+        $this->type = $type;
+
+        return $this;
+    }
+    /**
+     * Get type
+     *
+     * @return string
+     */
+    public function getType()
+    {
+        return $this->type;
+    }
+    /**
+     * Set description
+     *
+     * @param string $description
+     *
+     * @return DocumentWish
+     */
+    public function setDescription($description)
+    {
+        $this->description = $description;
+
+        return $this;
+    }
+    /**
+     * Get description
+     *
+     * @return string
+     */
+    public function getDescription()
+    {
+        return $this->description;
+    }
+    /**
+     * Add file
+     *
+     * @param \AppBundle\Entity\Core\File $file
+     *
+     * @return DocumentWish
+     */
+    public function addFile(\AppBundle\Entity\Core\File $file)
+    {
+        $file->setDocumentWish($this);
+        $this->files[] = $file;
+
+        return $this;
+    }
+    /**
+     * Remove file
+     *
+     * @param \AppBundle\Entity\Core\File $file
+     */
+    public function removeFile(\AppBundle\Entity\Core\File $file)
+    {
+        $this->files->removeElement($file);
+    }
+    /**
+     * Get files
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getFiles()
+    {
+        return $this->files;
+    }
+    /**
+     * Set personOwner
+     *
+     * @param \AppBundle\Entity\Person\Person $personOwner
+     *
+     * @return DocumentWish
+     */
+    public function setPersonOwner(\AppBundle\Entity\Person\Person $personOwner = null)
+    {
+        $this->personOwner = $personOwner;
+
+        return $this;
+    }
+    /**
+     * Get personOwner
+     *
+     * @return \AppBundle\Entity\Person\Person
+     */
+    public function getPersonOwner()
+    {
+        return $this->personOwner;
+    }
+}

+ 452 - 0
old/Entity/AccessWish/EducationStudentWish.php

@@ -0,0 +1,452 @@
+<?php
+
+namespace AppBundle\Entity\AccessWish;
+
+use AppBundle\Annotation\ExportTranslate;
+use AppBundle\Entity\Education\Education;
+use AppBundle\Entity\Education\EducationCurriculum;
+use AppBundle\Entity\Education\EducationStudent;
+use AppBundle\Entity\Education\EducationTiming;
+use AppBundle\Enum\OnlineRegistration\EducationStudentWishOriginEnum;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Finite\StatefulInterface;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * EducationStudentWish.
+ *
+ * @see http://schema.org/EducationStudentWish Documentation on Schema.org
+ *
+ * @Iri("http://schema.org/EducationStudentWish")
+ */
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\AccessWish\Repository\EducationStudentWishRepository')]
+class EducationStudentWish
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['educationstudentwish', 'online_registration', 'education_student_wish_list', 'online_registration_validation_access_family', 'online_registration_validation'])]
+    private $id;
+    /**
+     * @var Education
+     *
+     *
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Education\Education')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['educationstudentwish', 'online_registration_educationstudentwishes', 'online_registration_educationstudentreregistrationswishes', 'education_student_wish_list', 'online_registration_validation_educationstudentwishes', 'online_registration_validation_educationstudentreregistrationswishes'])]
+    private $educationWish;
+    /**
+     * @var array
+     */
+    #[ORM\Column(type: 'json_array', nullable: true)]
+    #[Groups(['educationstudentwish', 'online_registration_educationstudentwishes', 'online_registration_educationstudentreregistrationswishes', 'online_registration_validation_educationstudentwishes', 'online_registration_validation_educationstudentreregistrationswishes'])]
+    private $days;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'time', nullable: true)]
+    #[Assert\Time]
+    #[Groups(['educationstudentwish', 'online_registration_educationstudentwishes', 'online_registration_educationstudentreregistrationswishes', 'online_registration_validation_educationstudentwishes', 'online_registration_validation_educationstudentreregistrationswishes'])]
+    private $time;
+    /**
+     * @var AccessWish
+     *
+     *
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessWish\AccessWish', inversedBy: 'educationStudentWishes')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['educationstudentwish', 'education_student_wish_list', 'online_registration_validation_access_family'])]
+    private $accessWish;
+    /**
+     * @var AccessWish
+     *
+     *
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessWish\AccessWish', inversedBy: 'educationStudentReregistrationsWishes')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['educationstudentwish', 'education_student_wish_list', 'online_registration_validation_access_family'])]
+    private $accessWishReregistrations;
+    private $accessSearch;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['educationstudentwish', 'online_registration_educationstudentwishes', 'online_registration_validation_educationstudentwishes'])]
+    private $registeredFollowingYear = false;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', options: ['default' => 'NO_INFORMATION'])]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\OnlineRegistration\WishRegistration', 'toArray'])]
+    #[Groups(['education_student_wish_list', 'online_registration_validation_educationstudentwishes', 'online_registration_validation_educationstudentreregistrationswishes', 'online_registration_educationstudentreregistrationswishes'])]
+    private $wishRegistration = "NO_INFORMATION";
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', options: ['default' => 'NEGOTIABLE'])]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\OnlineRegistration\RegistrationStatus', 'toArray'])]
+    #[Groups(['education_student_wish_list', 'online_registration_validation_educationstudentwishes', 'online_registration_validation_educationstudentreregistrationswishes'])]
+    private $registrationStatus = "NEGOTIABLE";
+    /**
+     * @var string
+     * @ExportTranslate(true)
+     */
+    #[Assert\Type(type: 'string')]
+    #[Groups(['education_student_wish_list'])]
+    private $origin;
+    /**
+     * @var EducationCurriculum
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Education\EducationCurriculum')]
+    #[Groups(['educationstudentwish_educationcurriculum', 'online_registration_validation_educationstudentwishes'])]
+    private $educationCurriculum;
+    /**
+     * @var EducationStudent
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Education\EducationStudent')]
+    #[Groups(['educationstudentwish', 'online_registration_educationstudentwishes', 'online_registration_educationstudentreregistrationswishes', 'online_registration_validation_educationstudentwishes', 'online_registration_validation_educationstudentreregistrationswishes'])]
+    private $educationStudent;
+    /**
+     * @var EducationTiming
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Education\EducationTiming')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['educationstudentwish', 'online_registration_educationstudentwishes', 'online_registration_educationstudentreregistrationswishes', 'online_registration_validation_educationstudentwishes', 'online_registration_validation_educationstudentreregistrationswishes'])]
+    private $educationTiming;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['educationstudentwish'])]
+    private $alreadyValidate = false;
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Get id
+     *
+     * @return integer
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set days
+     *
+     * @param array $days
+     *
+     * @return EducationStudentWish
+     */
+    public function setDays($days)
+    {
+        $this->days = $days;
+
+        return $this;
+    }
+    /**
+     * Get days
+     *
+     * @return array
+     */
+    public function getDays()
+    {
+        return $this->days;
+    }
+    /**
+     * Set accessWish
+     *
+     * @param \AppBundle\Entity\AccessWish\AccessWish $accessWish
+     *
+     * @return EducationStudentWish
+     */
+    public function setAccessWish(\AppBundle\Entity\AccessWish\AccessWish $accessWish = null)
+    {
+        $this->accessWish = $accessWish;
+
+        return $this;
+    }
+    /**
+     * Get accessWish
+     *
+     * @return \AppBundle\Entity\AccessWish\AccessWish
+     */
+    public function getAccessWish()
+    {
+        return $this->accessWish;
+    }
+    /**
+     * Set registeredFollowingYear
+     *
+     * @param boolean $registeredFollowingYear
+     *
+     * @return EducationStudentWish
+     */
+    public function setRegisteredFollowingYear($registeredFollowingYear)
+    {
+        $this->registeredFollowingYear = $registeredFollowingYear;
+
+        return $this;
+    }
+    /**
+     * Get registeredFollowingYear
+     *
+     * @return boolean
+     */
+    public function getRegisteredFollowingYear()
+    {
+        return $this->registeredFollowingYear;
+    }
+    /**
+     * Set time
+     *
+     * @param \DateTime $time
+     *
+     * @return EducationStudentWish
+     */
+    public function setTime($time)
+    {
+        $this->time = $time;
+
+        return $this;
+    }
+    /**
+     * Get time
+     *
+     * @return \DateTime
+     */
+    public function getTime()
+    {
+        return $this->time ? $this->time->format('H:i') : $this->time;
+    }
+    public function getTimeDateTime()
+    {
+        return $this->time;
+    }
+    /**
+     * Set registrationStatus
+     *
+     * @param string $registrationStatus
+     *
+     * @return EducationStudentWish
+     */
+    public function setRegistrationStatus($registrationStatus)
+    {
+        $this->registrationStatus = $registrationStatus;
+
+        return $this;
+    }
+    /**
+     * Get registrationStatus
+     *
+     * @return string
+     */
+    public function getRegistrationStatus()
+    {
+        return $this->registrationStatus;
+    }
+    /**
+     * Set wishRegistration
+     *
+     * @param string $wishRegistration
+     *
+     * @return EducationStudentWish
+     */
+    public function setWishRegistration($wishRegistration)
+    {
+        $this->wishRegistration = $wishRegistration;
+
+        return $this;
+    }
+    /**
+     * Get wishRegistration
+     *
+     * @return string
+     */
+    public function getWishRegistration()
+    {
+        return $this->wishRegistration;
+    }
+    /**
+     * Set accessWishReregistrations
+     *
+     * @param \AppBundle\Entity\AccessWish\AccessWish $accessWishReregistrations
+     *
+     * @return EducationStudentWish
+     */
+    public function setAccessWishReregistrations(\AppBundle\Entity\AccessWish\AccessWish $accessWishReregistrations = null)
+    {
+        $this->accessWishReregistrations = $accessWishReregistrations;
+
+        return $this;
+    }
+    /**
+     * Get accessWishReregistrations
+     *
+     * @return \AppBundle\Entity\AccessWish\AccessWish
+     */
+    public function getAccessWishReregistrations()
+    {
+        return $this->accessWishReregistrations;
+    }
+    /**
+     * Set educationWish
+     *
+     * @param \AppBundle\Entity\Education\Education $educationWish
+     *
+     * @return EducationStudentWish
+     */
+    public function setEducationWish(\AppBundle\Entity\Education\Education $educationWish = null)
+    {
+        $this->educationWish = $educationWish;
+
+        return $this;
+    }
+    /**
+     * Get educationWish
+     *
+     * @return \AppBundle\Entity\Education\Education
+     */
+    public function getEducationWish()
+    {
+        return $this->educationWish;
+    }
+    public function getAccessSearch(){
+        return $this->getAccessWish() ? $this->getAccessWish() : $this->getAccessWishReregistrations();
+    }
+    /**
+     * @return mixed
+     * @throws \Exception
+     */
+    public function getOrigin()
+    {
+        if(!empty($this->getAccessWishReregistrations())){
+            return EducationStudentWishOriginEnum::REREGISTRATION;
+        }else{
+            return EducationStudentWishOriginEnum::NEW_REGISTRATION;
+        }
+    }
+    /**
+     * Set alreadyValidate
+     *
+     * @param boolean $alreadyValidate
+     *
+     * @return EducationStudentWish
+     */
+    public function setAlreadyValidate($alreadyValidate)
+    {
+        $this->alreadyValidate = $alreadyValidate;
+
+        return $this;
+    }
+    /**
+     * Get alreadyValidate
+     *
+     * @return boolean
+     */
+    public function getAlreadyValidate()
+    {
+        return $this->alreadyValidate;
+    }
+    /**
+     * Set educationCurriculum
+     *
+     * @param \AppBundle\Entity\Education\EducationCurriculum $educationCurriculum
+     *
+     * @return EducationStudentWish
+     */
+    public function setEducationCurriculum(\AppBundle\Entity\Education\EducationCurriculum $educationCurriculum = null)
+    {
+        $this->educationCurriculum = $educationCurriculum;
+
+        return $this;
+    }
+    /**
+     * Get educationCurriculum
+     *
+     * @return \AppBundle\Entity\Education\EducationCurriculum
+     */
+    public function getEducationCurriculum()
+    {
+        return $this->educationCurriculum;
+    }
+    /**
+     * Set educationTiming
+     *
+     * @param \AppBundle\Entity\Education\EducationTiming $educationTiming
+     *
+     * @return EducationStudentWish
+     */
+    public function setEducationTiming(\AppBundle\Entity\Education\EducationTiming $educationTiming = null)
+    {
+        $this->educationTiming = $educationTiming;
+
+        return $this;
+    }
+    /**
+     * Get educationTiming
+     *
+     * @return \AppBundle\Entity\Education\EducationTiming
+     */
+    public function getEducationTiming()
+    {
+        return $this->educationTiming;
+    }
+    /**
+     * Set educationStudent
+     *
+     * @param \AppBundle\Entity\Education\EducationStudent $educationStudent
+     *
+     * @return EducationStudentWish
+     */
+    public function setEducationStudent(\AppBundle\Entity\Education\EducationStudent $educationStudent = null)
+    {
+        $this->educationStudent = $educationStudent;
+
+        return $this;
+    }
+    /**
+     * Get educationStudent
+     *
+     * @return \AppBundle\Entity\Education\EducationStudent
+     */
+    public function getEducationStudent()
+    {
+        return $this->educationStudent;
+    }
+}

+ 32 - 0
old/Entity/AccessWish/Repository/AccessWishRepository.php

@@ -0,0 +1,32 @@
+<?php
+
+namespace AppBundle\Entity\AccessWish\Repository;
+
+use AppBundle\Entity\HasItemQueryBuilderInterface;
+use AppBundle\Entity\Organization\Organization;
+use Doctrine\ORM\EntityRepository;
+use Doctrine\ORM\QueryBuilder;
+
+/**
+ * Description of AccessWishRepository
+ *
+ */
+class AccessWishRepository extends EntityRepository
+{
+
+    /**
+     * @param $access
+     * @param $accessWhishesIds
+     * @return array
+     */
+    public function findAccessWishByIds($accessWhishesIds)
+    {
+        $queryBuilder = $this->createQueryBuilder('o');
+        $queryBuilder
+            ->andWhere(
+                $queryBuilder->expr()->in('o.id', ':ids'))
+            ->setParameter('ids', $accessWhishesIds);
+
+        return $queryBuilder->getQuery()->getResult();
+    }
+}

+ 42 - 0
old/Entity/AccessWish/Repository/EducationStudentWishRepository.php

@@ -0,0 +1,42 @@
+<?php
+
+namespace AppBundle\Entity\AccessWish\Repository;
+
+use AppBundle\Entity\Education\Education;
+use AppBundle\Entity\Education\EducationCurriculum;
+use AppBundle\Entity\HasItemQueryBuilderInterface;
+use AppBundle\Entity\Organization\Organization;
+use Doctrine\ORM\EntityRepository;
+use Doctrine\ORM\QueryBuilder;
+
+/**
+ * Description of EducationStudentWishRepository
+ *
+ */
+class EducationStudentWishRepository extends EntityRepository
+{
+
+    public function getEducationStudentByEducation(Education $education,Organization $organization){
+//        $education = $educationCurriculum->getEducation();
+        $filter = $this->_em->getFilters()->enable('activity_year');
+        $filter->setParameter('disabledFilter', 1);
+        $queryBuilder = $this->createQueryBuilder('education_student_wish');
+        $queryBuilder
+            ->leftJoin('education_student_wish.accessWish','accessWish')
+            ->leftJoin('education_student_wish.accessWishReregistrations','accessWishReregistrations')
+            ->leftJoin('accessWish.organization','organization')
+            ->leftJoin('accessWishReregistrations.organization','organization2')
+            ->leftJoin('education_student_wish.educationWish','educationWish')
+            ->leftJoin('accessWish.accessFamilyWish', 'accessWishAccessFamilyWish')
+            ->leftJoin('accessWishReregistrations.accessFamilyWish', 'accessWishAccessFamilyWish2')
+            ->andWhere('(educationWish.id=:education and organization.id=:organization and accessWishAccessFamilyWish.registrationCompleted =:registrationCompleted) or (educationWish.id=:education and organization2.id=:organization and accessWishAccessFamilyWish2.registrationCompleted =:registrationCompleted)')
+            ->setParameter('organization', $organization)
+            ->setParameter('education', $education)
+            ->setParameter('registrationCompleted', true);
+
+        $filter->setParameter('disabledFilter', 0);
+
+        return $queryBuilder->getQuery()->getResult();
+    }
+
+}

+ 653 - 0
old/Entity/Awin/Product.php

@@ -0,0 +1,653 @@
+<?php
+
+namespace AppBundle\Entity\Awin;
+
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Validator\Constraints as Assert;
+use Gedmo\Mapping\Annotation as Gedmo;
+use AppBundle\Entity\Traits\TimestampableEntity;
+
+/**
+ * Produit/Evènement pour le portail fourni par le partenaire Awin
+ */
+#[ORM\Table(name: 'AwinProduct')]
+#[ORM\Entity]
+class Product
+{
+    use TimestampableEntity;
+    /**
+     * @var string 
+     *
+     *
+     */
+    #[ORM\Column(name: 'id', type: 'string')]
+    #[ORM\Id]
+    protected $id;
+    /**
+     * @var string
+     * @Gedmo\Slug(fields={"name"}, style="camel", separator="_")
+     *
+     */
+    #[ORM\Column(name: 'slug', type: 'string', length: 100)]
+    protected $slug;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(name: 'name', type: 'string', length: 255)]
+    protected $name;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(name: 'description', type: 'text', length: 65535, nullable: true)]
+    protected $description;
+    /**
+     * @var array
+     *
+     *
+     */
+    #[ORM\Column(type: 'json_array', nullable: true)]
+    protected $categories;
+    /**
+     * @var \DateTime
+     *
+     *
+     */
+    #[ORM\Column(name: 'datetimeStart', type: 'date', nullable: true)]
+    protected $datetimeStart;
+    /**
+     * @var \DateTime
+     *
+     *
+     */
+    #[ORM\Column(name: 'datetimeEnd', type: 'date', nullable: true)]
+    protected $datetimeEnd;
+    /**
+     * @var array
+     *
+     *
+     */
+    #[ORM\Column(name: 'meeting_schedule', type: 'json_array', nullable: true)]
+    protected $meetingSchedule;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(name: 'place_code', type: 'string', length: 50, nullable: true)]
+    protected $placeCode;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(name: 'place', type: 'string', length: 50, nullable: true)]
+    protected $place;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(name: 'streetAddress', type: 'string', length: 100, nullable: true)]
+    protected $streetAddress;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(name: 'postalCode', type: 'string', length: 9, nullable: true)]
+    protected $postalCode;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(name: 'city', type: 'string', length: 50, nullable: true)]
+    protected $city;
+    /**
+     * @var string
+     */
+    #[ORM\Column(name: 'country', type: 'string', length: 50, nullable: true)]
+    protected $country;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(name: 'latitude', type: 'decimal', precision: 18, scale: 15, nullable: true)]
+    protected $latitude;
+    /**
+     * @var string
+     *
+     *
+     *
+     */
+    #[ORM\Column(name: 'longitude', type: 'decimal', precision: 18, scale: 15, nullable: true)]
+    protected $longitude;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(name: 'mediumimage', type: 'string', length: 2000, nullable: true)]
+    protected $mediumimage;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(name: 'largeimage', type: 'string', length: 2000, nullable: true)]
+    protected $largeimage;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(name: 'deepLink', type: 'text', nullable: true)]
+    protected $deepLink;
+    /**
+     * @var float
+     *
+     *
+     */
+    #[ORM\Column(name: 'price_mini', type: 'float', nullable: true)]
+    protected $priceMini;
+    /**
+     * @var float
+     *
+     *
+     */
+    #[ORM\Column(name: 'price_maxi', type: 'float', nullable: true)]
+    protected $priceMaxi;
+    /**
+     * @var string
+     */
+    #[ORM\Column(name: 'artists', type: 'text', length: 65535, nullable: true)]
+    protected $artists;
+    /**
+     * Set id
+     *
+     * @param string $id
+     * 
+     * @return Product
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+        return $this;
+    }
+    /**
+     * Get id
+     *
+     * @return string
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set slug
+     *
+     * @param string $slug
+     *
+     * @return Product
+     */
+    public function setSlug($slug)
+    {
+        $this->slug = $slug;
+
+        return $this;
+    }
+    /**
+     * Get slug
+     *
+     * @return string
+     */
+    public function getSlug()
+    {
+        return $this->slug;
+    }
+    /**
+     * Set name
+     *
+     * @param string $name
+     *
+     * @return Product
+     */
+    public function setName($name)
+    {
+        $this->name = $name;
+
+        return $this;
+    }
+    /**
+     * Get name
+     *
+     * @return string
+     */
+    public function getName()
+    {
+        return $this->name;
+    }
+    /**
+     * Set description
+     *
+     * @param string $description
+     *
+     * @return Product
+     */
+    public function setDescription($description)
+    {
+        $this->description = $description;
+
+        return $this;
+    }
+    /**
+     * Get description
+     *
+     * @return string
+     */
+    public function getDescription()
+    {
+        return $this->description;
+    }
+    /**
+     * Set categories
+     *
+     * @param array $categories
+     *
+     * @return Product
+     */
+    public function setCategories(array $categories)
+    {
+        $this->categories = $categories;
+
+        return $this;
+    }
+    /**
+     * Get categories
+     *
+     * @return array
+     */
+    public function getCategories()
+    {
+        return $this->categories;
+    }
+    /**
+     * Set datetimeStart
+     *
+     * @param \DateTime $datetimeStart
+     *
+     * @return Product
+     */
+    public function setDatetimeStart($datetimeStart)
+    {
+        $this->datetimeStart = $datetimeStart;
+
+        return $this;
+    }
+    /**
+     * Get datetimeStart
+     *
+     * @return \DateTime
+     */
+    public function getDatetimeStart()
+    {
+        return $this->datetimeStart;
+    }
+    /**
+     * Set datetimeEnd
+     *
+     * @param \DateTime $datetimeEnd
+     *
+     * @return Product
+     */
+    public function setDatetimeEnd($datetimeEnd)
+    {
+        $this->datetimeEnd = $datetimeEnd;
+
+        return $this;
+    }
+    /**
+     * Get datetimeEnd
+     *
+     * @return \DateTime
+     */
+    public function getDatetimeEnd()
+    {
+        return $this->datetimeEnd;
+    }
+    /**
+     * Set meetingSchedule
+     *
+     * @param array $meetingSchedule
+     *
+     * @return Product
+     */
+    public function setMeetingSchedule(array $meetingSchedule)
+    {
+        $this->meetingSchedule = $meetingSchedule;
+
+        return $this;
+    }
+    /**
+     * Get meetingSchedule
+     *
+     * @return array
+     */
+    public function getMeetingSchedule()
+    {
+        return $this->meetingSchedule;
+    }
+    /**
+     * Set placeCode
+     *
+     * @param string $placeCode
+     *
+     * @return Product
+     */
+    public function setPlaceCode($placeCode)
+    {
+        $this->placeCode = $placeCode;
+
+        return $this;
+    }
+    /**
+     * Get placeCode
+     *
+     * @return string
+     */
+    public function getPlaceCode()
+    {
+        return $this->placeCode;
+    }
+    /**
+     * Set place
+     *
+     * @param string $place
+     *
+     * @return Product
+     */
+    public function setPlace($place)
+    {
+        $this->place = $place;
+
+        return $this;
+    }
+    /**
+     * Get place
+     *
+     * @return string
+     */
+    public function getPlace()
+    {
+        return $this->place;
+    }
+    /**
+     * Set streetAddress
+     *
+     * @param string $streetAddress
+     *
+     * @return Product
+     */
+    public function setStreetAddress($streetAddress)
+    {
+        $this->streetAddress = $streetAddress;
+
+        return $this;
+    }
+    /**
+     * Get streetAddress
+     *
+     * @return string
+     */
+    public function getStreetAddress()
+    {
+        return $this->streetAddress;
+    }
+    /**
+     * Set postalCode
+     *
+     * @param string $postalCode
+     *
+     * @return Product
+     */
+    public function setPostalCode($postalCode)
+    {
+        $this->postalCode = $postalCode;
+
+        return $this;
+    }
+    /**
+     * Get postalCode
+     *
+     * @return string
+     */
+    public function getPostalCode()
+    {
+        return $this->postalCode;
+    }
+    /**
+     * Set city
+     *
+     * @param string $city
+     *
+     * @return Product
+     */
+    public function setCity($city)
+    {
+        $this->city = $city;
+
+        return $this;
+    }
+    /**
+     * Get city
+     *
+     * @return string
+     */
+    public function getCity()
+    {
+        return $this->city;
+    }
+    /**
+     * Set country
+     *
+     * @param string $country
+     *
+     * @return Product
+     */
+    public function setCountry($country)
+    {
+        $this->country = $country;
+
+        return $this;
+    }
+    /**
+     * Get country
+     *
+     * @return string
+     */
+    public function getCountry()
+    {
+        return $this->country;
+    }
+    /**
+     * Set latitude
+     *
+     * @param string $latitude
+     *
+     * @return Product
+     */
+    public function setLatitude($latitude)
+    {
+        $this->latitude = $latitude;
+
+        return $this;
+    }
+    /**
+     * Get latitude
+     *
+     * @return string
+     */
+    public function getLatitude()
+    {
+        return $this->latitude;
+    }
+    /**
+     * Set longitude
+     *
+     * @param string $longitude
+     *
+     * @return Product
+     */
+    public function setLongitude($longitude)
+    {
+        $this->longitude = $longitude;
+
+        return $this;
+    }
+    /**
+     * Get longitude
+     *
+     * @return string
+     */
+    public function getLongitude()
+    {
+        return $this->longitude;
+    }
+    /**
+     * Set mediumimage
+     *
+     * @param string $mediumimage
+     *
+     * @return Product
+     */
+    public function setMediumimage($mediumimage)
+    {
+        $this->mediumimage = $mediumimage;
+
+        return $this;
+    }
+    /**
+     * Get mediumimage
+     *
+     * @return string
+     */
+    public function getMediumimage()
+    {
+        return $this->mediumimage;
+    }
+    /**
+     * Set largeimage
+     *
+     * @param string $largeimage
+     *
+     * @return Product
+     */
+    public function setLargeimage($largeimage)
+    {
+        $this->largeimage = $largeimage;
+
+        return $this;
+    }
+    /**
+     * Get largeimage
+     *
+     * @return string
+     */
+    public function getLargeimage()
+    {
+        return $this->largeimage;
+    }
+    /**
+     * Set deepLink
+     *
+     * @param string $deepLink
+     *
+     * @return Product
+     */
+    public function setDeepLink($deepLink)
+    {
+        $this->deepLink = $deepLink;
+
+        return $this;
+    }
+    /**
+     * Get deepLink
+     *
+     * @return string
+     */
+    public function getDeepLink()
+    {
+        return $this->deepLink;
+    }
+    /**
+     * Set priceMini
+     *
+     * @param float $priceMini
+     *
+     * @return Product
+     */
+    public function setPriceMini($priceMini)
+    {
+        $this->priceMini = $priceMini;
+
+        return $this;
+    }
+    /**
+     * Get priceMini
+     *
+     * @return float
+     */
+    public function getPriceMini()
+    {
+        return $this->priceMini;
+    }
+    /**
+     * Set priceMaxi
+     *
+     * @param float $priceMaxi
+     *
+     * @return Product
+     */
+    public function setPriceMaxi($priceMaxi)
+    {
+        $this->priceMaxi = $priceMaxi;
+
+        return $this;
+    }
+    /**
+     * Get priceMaxi
+     *
+     * @return float
+     */
+    public function getPriceMaxi()
+    {
+        return $this->priceMaxi;
+    }
+    /**
+     * Set artists
+     *
+     * @param string $artists
+     *
+     * @return Product
+     */
+    public function setArtists($artists)
+    {
+        $this->artists = $artists;
+
+        return $this;
+    }
+    /**
+     * Get artists
+     *
+     * @return string
+     */
+    public function getArtists()
+    {
+        return $this->artists;
+    }
+}

+ 493 - 0
old/Entity/Bank/BankAccount.php

@@ -0,0 +1,493 @@
+<?php
+
+namespace AppBundle\Entity\Bank;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Organization\Organization;
+use AppBundle\Entity\Person\Person;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Coordonnées bancaires des Person et Organization
+ *
+ * @Iri("http://schema.org/BankAccount")
+ */
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\Bank\Repository\BankAccountRepository')]
+class BankAccount
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['bankaccount', 'access_details_person', 'organization_details', 'sepa_debit_mandate_person', 'build_bills_access'])]
+    private $id;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Length(max: 255, maxMessage: 'invalid-max-length')]
+    #[Groups(['bankaccount', 'access_details_person', 'organization_details_bankaccount', 'build_bills_access'])]
+    private $bankName;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 11, nullable: true)]
+    #[Assert\Bic(message: 'This is not a valid Business Identifier Code (BIC).')]
+    #[Groups(['bankaccount', 'access_details_person', 'organization_details_bankaccount', 'sepa_debit_mandate_person', 'build_bills_access'])]
+    private $bic;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Groups(['bankaccount'])]
+    private $bicInvalid;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 34, nullable: true)]
+    #[Assert\Iban(message: 'This is not a valid International Bank Account Number (IBAN).')]
+    #[Groups(['bankaccount', 'access_details_person', 'organization_details_bankaccount', 'sepa_debit_mandate_person', 'build_bills_access'])]
+    private $iban;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Groups(['bankaccount'])]
+    private $ibanInvalid;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['bankaccount', 'access_details_person', 'sepa_debit_mandate_person', 'build_bills_access'])]
+    private $holderIdDifferent = false;
+    /**
+     * 0 => jamais facturé, 1 => facturé 1 fois, 2 => facturé plusieurs fois
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true, options: ['default' => 0])]
+    #[Groups(['bankaccount', 'access_details_person', 'sepa_debit_mandate_person', 'build_bills_access'])]
+    private $countInvoiced = 0;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['bankaccount', 'access_details_person', 'sepa_debit_mandate_person', 'build_bills_access'])]
+    private $holder;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['bankaccount', 'access_details_person', 'sepa_debit_mandate_person', 'build_bills_access'])]
+    private $principal = false;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Length(max: 255, maxMessage: 'invalid-max-length')]
+    #[Groups(['bankaccount', 'access_details_person', 'build_bills_access'])]
+    private $debitAddress;
+    /**
+     * @var Organization
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Organization\Organization', mappedBy: 'bankAccount', cascade: ['persist'])]
+    private $organization;
+    /**
+     * @var Person
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Person\Person', mappedBy: 'bankAccount', cascade: ['persist'])]
+    private $person;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 35, unique: true, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['bankaccount', 'access_details_person', 'sepa_debit_mandate_person', 'build_bills_access'])]
+    #[Assert\Length(max: 35, maxMessage: 'invalid-max-length')]
+    private $rum;
+    /**
+     * @var
+     *
+     * @Iri("https://schema.org/birthDate")
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date(message: 'invalid-date')]
+    #[Groups(['bankaccount', 'access_details_person', 'build_bills_access'])]
+    private $signatureDateSamplingMandate;
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+        $this->organization = new \Doctrine\Common\Collections\ArrayCollection();
+        $this->person = new \Doctrine\Common\Collections\ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Get organization
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getOrganization()
+    {
+        return $this->organization;
+    }
+    /**
+     * Get person
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getPerson()
+    {
+        return $this->person;
+    }
+    /**
+     * Sets bankName.
+     *
+     * @param string $bankName
+     *
+     * @return $this
+     */
+    public function setBankName($bankName)
+    {
+        $this->bankName = $bankName;
+
+        return $this;
+    }
+    /**
+     * Gets bankName.
+     *
+     * @return string
+     */
+    public function getBankName()
+    {
+        return $this->bankName;
+    }
+    /**
+     * Sets bic.
+     *
+     * @param string $bic
+     *
+     * @return $this
+     */
+    public function setBic($bic)
+    {
+        $this->bic = $bic;
+
+        if(!is_null($bic) && !is_null($this->getBicInvalid()))
+            $this->setBicInvalid(NULL);
+
+        return $this;
+    }
+    /**
+     * Gets bic.
+     *
+     * @return string
+     */
+    public function getBic()
+    {
+        return $this->bic;
+    }
+    /**
+     * Sets bic Invalid.
+     *
+     * @param string $bicInvalid
+     *
+     * @return $this
+     */
+    public function setBicInvalid($bicInvalid)
+    {
+        $this->bicInvalid = is_null($this->bic) ? $bicInvalid : NULL;
+        return $this;
+    }
+    /**
+     * Gets bic Invalid.
+     *
+     * @return string
+     */
+    public function getBicInvalid()
+    {
+        return $this->bicInvalid;
+    }
+    /**
+     * Sets iban.
+     *
+     * @param string $iban
+     *
+     * @return $this
+     */
+    public function setIban($iban)
+    {
+        $this->iban = $iban;
+
+        if(!is_null($iban) && !is_null($this->getIbanInvalid()))
+            $this->setIbanInvalid(NULL);
+
+        return $this;
+    }
+    /**
+     * Gets iban.
+     *
+     * @return string
+     */
+    public function getIban()
+    {
+        return $this->iban;
+    }
+    /**
+     * Sets ibanInvalid.
+     *
+     * @param string $ibanInvalid
+     *
+     * @return $this
+     */
+    public function setIbanInvalid($ibanInvalid)
+    {
+        $this->ibanInvalid = is_null($this->iban) ? $ibanInvalid : NULL;
+
+        return $this;
+    }
+    /**
+     * Gets ibanInvalid.
+     *
+     * @return string
+     */
+    public function getIbanInvalid()
+    {
+        return $this->ibanInvalid;
+    }
+    /**
+     * Sets holder.
+     *
+     * @param string $holder
+     *
+     * @return $this
+     */
+    public function setHolder($holder)
+    {
+        $this->holder = $holder;
+
+        return $this;
+    }
+    /**
+     * Gets holder.
+     *
+     * @return string
+     */
+    public function getHolder()
+    {
+        return $this->holder;
+    }
+    /**
+     * Sets principal.
+     *
+     * @param bool $principal
+     *
+     * @return $this
+     */
+    public function setPrincipal($principal)
+    {
+        $this->principal = $principal;
+
+        return $this;
+    }
+    /**
+     * Gets principal.
+     *
+     * @return bool
+     */
+    public function getPrincipal()
+    {
+        return $this->principal;
+    }
+    /**
+     * Sets debitAddress.
+     *
+     * @param string $debitAddress
+     *
+     * @return $this
+     */
+    public function setDebitAddress($debitAddress)
+    {
+        $this->debitAddress = $debitAddress;
+
+        return $this;
+    }
+    /**
+     * Gets debitAddress.
+     *
+     * @return string
+     */
+    public function getDebitAddress()
+    {
+        return $this->debitAddress;
+    }
+    /**
+     * Add organization
+     *
+     * @param \AppBundle\Entity\Organization\Organization $organization
+     *
+     * @return BankAccount
+     */
+    public function addOrganization(\AppBundle\Entity\Organization\Organization $organization)
+    {
+        $this->organization[] = $organization;
+
+        return $this;
+    }
+    /**
+     * Remove organization
+     *
+     * @param \AppBundle\Entity\Organization\Organization $organization
+     */
+    public function removeOrganization(\AppBundle\Entity\Organization\Organization $organization)
+    {
+        $this->organization->removeElement($organization);
+    }
+    /**
+     * Add person
+     *
+     * @param \AppBundle\Entity\Person\Person $person
+     *
+     * @return BankAccount
+     */
+    public function addPerson(\AppBundle\Entity\Person\Person $person)
+    {
+        $this->person[] = $person;
+
+        return $this;
+    }
+    /**
+     * Remove person
+     *
+     * @param \AppBundle\Entity\Person\Person $person
+     */
+    public function removePerson(\AppBundle\Entity\Person\Person $person)
+    {
+        $this->person->removeElement($person);
+    }
+    /**
+     * Get rum
+     *
+     * @return string
+     */
+    public function getRum()
+    {
+        return $this->rum;
+    }
+    /**
+     * Set rum
+     *
+     * @param string $rum
+     *
+     * @return BankAccount
+     */
+    public function setRum($rum)
+    {
+        $this->rum = $rum;
+
+        return $this;
+    }
+    /**
+     * Set signatureDateSamplingMandate
+     *
+     * @param \DateTime $signatureDateSamplingMandate
+     *
+     * @return BankAccount
+     */
+    public function setSignatureDateSamplingMandate($signatureDateSamplingMandate)
+    {
+        $this->signatureDateSamplingMandate = $signatureDateSamplingMandate;
+
+        return $this;
+    }
+    /**
+     * Get signatureDateSamplingMandate
+     *
+     * @return \DateTime
+     */
+    public function getSignatureDateSamplingMandate()
+    {
+        return $this->signatureDateSamplingMandate ? $this->signatureDateSamplingMandate->format('Y-m-d') : $this->signatureDateSamplingMandate;
+    }
+    /**
+     * Set holderIdDifferent
+     *
+     * @param boolean $holderIdDifferent
+     *
+     * @return BankAccount
+     */
+    public function setHolderIdDifferent($holderIdDifferent)
+    {
+        $this->holderIdDifferent = $holderIdDifferent;
+
+        return $this;
+    }
+    /**
+     * Get holderIdDifferent
+     *
+     * @return boolean
+     */
+    public function getHolderIdDifferent()
+    {
+        return $this->holderIdDifferent;
+    }
+    /**
+     * Set countInvoiced
+     *
+     * @param integer $countInvoiced
+     *
+     * @return BankAccount
+     */
+    public function setCountInvoiced($countInvoiced)
+    {
+        $this->countInvoiced = $countInvoiced;
+
+        return $this;
+    }
+    /**
+     * Get countInvoiced
+     *
+     * @return integer
+     */
+    public function getCountInvoiced()
+    {
+        return $this->countInvoiced;
+    }
+}

+ 66 - 0
old/Entity/Bank/Repository/BankAccountRepository.php

@@ -0,0 +1,66 @@
+<?php
+
+namespace AppBundle\Entity\Bank\Repository;
+
+use AppBundle\Entity\Organization\Organization;
+use Doctrine\ORM\EntityRepository;
+
+/**
+ * Description of BankAccountRepository
+ *
+ */
+class BankAccountRepository extends EntityRepository
+{
+    public function findInvalidBankAccountByOrganization(Organization $organization)
+    {
+        $queryBuilder = $this->createQueryBuilder('o');
+        $queryBuilder
+            ->innerJoin('o.organization', 'organization')
+            ->andWhere('organization.id = :organization')
+            ->andWhere(
+                $queryBuilder->expr()->orX(
+                    $queryBuilder->expr()->andX($queryBuilder->expr()->isNotNull('o.bicInvalid'), $queryBuilder->expr()->neq('o.bicInvalid', ':empty')),
+                    $queryBuilder->expr()->andX($queryBuilder->expr()->isNotNull('o.ibanInvalid'), $queryBuilder->expr()->neq('o.ibanInvalid', ':empty'))
+                ))
+            ->setParameter('organization', $organization->getId())
+            ->setParameter('empty', '');
+
+        return $queryBuilder->getQuery()->getResult();
+    }
+
+    public function findInvalidBankAccountByAccess(Organization $organization)
+    {
+        $queryBuilder = $this->_em->createQueryBuilder();
+        $queryBuilder
+            ->select('access')
+            ->from('AppBundle:AccessAndFunction\Access', 'access')
+            ->innerJoin('access.organizationFunction', 'function')
+            ->andWhere('access.organization = :organization')
+            ->andWhere('function.startDate < :dateEnd')
+            ->andWhere(
+                $queryBuilder->expr()->orX(
+                    $queryBuilder->expr()->gt('function.endDate', ':dateStart'),
+                    $queryBuilder->expr()->isNull('function.endDate')
+                ))
+            ->setParameter('organization', $organization->getId())
+            ->setParameter('dateStart', date('Y-m-d'))
+            ->setParameter('dateEnd', date('Y-m-d'));
+
+        $ids = array_map(function($o) {return $o->getPerson()->getId();}, $queryBuilder->getQuery()->getResult());
+
+        $queryBuilder = $this->createQueryBuilder('o');
+        $queryBuilder
+            ->innerJoin('o.person', 'person')
+            ->andWhere(
+                $queryBuilder->expr()->in('person', ':ids'),
+                $queryBuilder->expr()->orX(
+                    $queryBuilder->expr()->andX($queryBuilder->expr()->isNotNull('o.bicInvalid'), $queryBuilder->expr()->neq('o.bicInvalid', ':empty')),
+                    $queryBuilder->expr()->andX($queryBuilder->expr()->isNotNull('o.ibanInvalid'), $queryBuilder->expr()->neq('o.ibanInvalid', ':empty'))
+                ))
+            ->setParameter('ids', $ids)
+            ->setParameter('empty', '');
+
+        return $queryBuilder->getQuery()->getResult();
+    }
+}
+

+ 287 - 0
old/Entity/Billing/AbstractBillingIntangible.php

@@ -0,0 +1,287 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\Core\Tagg;
+use AppBundle\Entity\Organization\Organization;
+use AppBundle\Entity\Product\Intangible;
+use AppBundle\Entity\Traits\ActivityPeriodTrait;
+use AppBundle\Entity\Traits\BillingRuleTrait;
+use AppBundle\Entity\Traits\LockableTrait;
+use AppBundle\Enum\Billing\PeriodicityTypeEnum;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Validator\Constraints as Assert;
+use Doctrine\Common\Collections\ArrayCollection;
+use Symfony\Component\Serializer\Annotation\Groups;
+use AppBundle\Annotation\DefaultField;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Enregistrement d'un produit à facturer par une Organization, un Access ou un EducationalProject
+ * Classe de base de @see AccessIntangible, EducationalProjectIntangible
+ *
+ *
+ */
+#[ORM\Entity]
+#[ORM\Table(name: 'BillingIntangible')]
+#[ORM\InheritanceType('SINGLE_TABLE')]
+#[ORM\DiscriminatorColumn(name: 'discr', type: 'string')]
+#[ORM\DiscriminatorMap(['access' => 'AccessIntangible', 'educationalproject' => 'EducationalProjectIntangible'])]
+abstract class AbstractBillingIntangible
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    use ActivityPeriodTrait;
+    use BillingRuleTrait;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['accessintangible', 'educationalprojectintangible', 'access_details', 'student_registration', 'educationalproject_details', 'accessbilling_edit'])]
+    private $id;
+    /**
+     * @var Intangible
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Product\Intangible', inversedBy: 'accessIntangibles')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['accessintangible', 'accessintangible_intangible', 'educationalprojectintangible', 'access_details_accessintangibles', 'student_registration_accessintangibles', 'educationalproject_details_educationalprojectintangibles', 'accessbilling_edit_accessintangibles', 'access_intangible_list'])]
+    private $intangible;
+    /**
+     * @var string
+     *
+     * @Iri("https://schema.org/description")
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accessintangible', 'educationalprojectintangible', 'student_registration_accessintangibles', 'accessbilling_edit_accessintangibles', 'access_intangible_list'])]
+    private $customDescription;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['accessintangible', 'educationalprojectintangible', 'student_registration_accessintangibles', 'accessbilling_edit_accessintangibles'])]
+    private $quantity;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['accessintangible', 'educationalprojectintangible', 'student_registration_accessintangibles', 'accessbilling_edit_accessintangibles'])]
+    private $forcedAmount;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['accessintangible', 'educationalprojectintangible', 'student_registration_accessintangibles', 'accessbilling_edit_accessintangibles'])]
+    private $isForcedAmount = false;
+    /**
+     * @var ArrayCollection<Tagg>
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\Tagg', cascade: ['persist'], inversedBy: 'billingIntangibles')]
+    #[Assert\Valid]
+    #[ORM\JoinTable(name: 'tag_billingIntangible', joinColumns: [], inverseJoinColumns: [])]
+    #[ORM\JoinColumn(name: 'billingIntangible_id', referencedColumnName: 'id')]
+    #[ORM\JoinColumn(name: 'tag_id', referencedColumnName: 'id')]
+    #[Groups(['billingintangible_tags', 'manage_tags', 'access_intangible_list'])]
+    private $tags;
+    /**
+     * The constructor
+     */
+    public function __construct() {
+        $this->tags= new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set customDescription
+     *
+     * @param string $customDescription
+     *
+     * @return AbstractBillingIntangible
+     */
+    public function setCustomDescription($customDescription)
+    {
+        $this->customDescription = $customDescription;
+
+        return $this;
+    }
+    /**
+     * Get customDescription
+     *
+     * @return string
+     */
+    public function getCustomDescription()
+    {
+        return $this->customDescription;
+    }
+    /**
+     * Set quantity
+     *
+     * @param integer $quantity
+     *
+     * @return AbstractBillingIntangible
+     */
+    public function setQuantity($quantity)
+    {
+        $this->quantity = $quantity;
+
+        return $this;
+    }
+    /**
+     * Get quantity
+     *
+     * @return integer
+     */
+    public function getQuantity()
+    {
+        return $this->quantity;
+    }
+    /**
+     * Set forcedAmount
+     *
+     * @param float $forcedAmount
+     *
+     * @return AbstractBillingIntangible
+     */
+    public function setForcedAmount($forcedAmount)
+    {
+        $this->forcedAmount = floatval($forcedAmount);
+
+        return $this;
+    }
+    /**
+     * Get forcedAmount
+     *
+     * @return float
+     */
+    public function getForcedAmount()
+    {
+        return $this->forcedAmount;
+    }
+    /**
+     * Set isForcedAmount
+     *
+     * @param boolean $isForcedAmount
+     *
+     * @return AbstractBillingIntangible
+     */
+    public function setIsForcedAmount($isForcedAmount)
+    {
+        $this->isForcedAmount = $isForcedAmount;
+
+        return $this;
+    }
+    /**
+     * Get isForcedAmount
+     *
+     * @return boolean
+     */
+    public function getIsForcedAmount()
+    {
+        return $this->isForcedAmount;
+    }
+    /**
+     * Set intangible
+     *
+     * @param \AppBundle\Entity\Product\Intangible $intangible
+     *
+     * @return AbstractBillingIntangible
+     */
+    public function setIntangible(\AppBundle\Entity\Product\Intangible $intangible)
+    {
+        $this->intangible = $intangible;
+
+        return $this;
+    }
+    /**
+     * Get intangible
+     *
+     * @return \AppBundle\Entity\Product\Intangible
+     */
+    public function getIntangible()
+    {
+        return $this->intangible;
+    }
+    /**
+     * Add tag
+     *
+     * @param \AppBundle\Entity\Core\Tagg $tag
+     *
+     * @return AbstractBillingIntangible
+     */
+    public function addTag(\AppBundle\Entity\Core\Tagg $tag)
+    {
+        $this->tags[] = $tag;
+
+        return $this;
+    }
+    /**
+     * Remove tag
+     *
+     * @param \AppBundle\Entity\Core\Tagg $tag
+     */
+    public function removeTag(\AppBundle\Entity\Core\Tagg $tag)
+    {
+        $this->tags->removeElement($tag);
+    }
+    /**
+     * Get tags
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getTags()
+    {
+        return $this->tags;
+    }
+    /**
+     * Sets start date
+     *
+     * @param \DateTime $startDate
+     * @return $this
+     */
+    public function setStartDate(\DateTime $startDate = null) {
+
+        if($startDate == null) $startDate = new \DateTime();
+        $this->startDate = $startDate;
+        if(!empty($this->getIntangible()) && $this->getIntangible()->getBillingPeriodicityType() === PeriodicityTypeEnum::PUNCTUAL){
+            $this->setEndDate($startDate);
+        }
+
+        return $this;
+    }
+    public function setEndDate(\DateTime $endDate = null) {
+        if(empty($endDate) && !empty($this->getIntangible()) && $this->getIntangible()->getBillingPeriodicityType() === PeriodicityTypeEnum::PUNCTUAL){
+            return $this;
+        }
+        $this->endDate = $endDate;
+        return $this;
+    }
+}

+ 97 - 0
old/Entity/Billing/AbstractBillingPayer.php

@@ -0,0 +1,97 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Validator\Constraints as Assert;
+use Doctrine\Common\Collections\ArrayCollection;
+use Symfony\Component\Serializer\Annotation\Groups;
+use AppBundle\Annotation\DefaultField;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Fais le lien entre l'Access qui règle la facture et l'Access ou
+ * l'EducationalProject concerné par la facture
+ * Classe de base de @see  AccessPayer, EducationalProjectPayer
+ *
+ * @Iri("http://schema.org/BillingPayer")
+ */
+#[ORM\Entity]
+#[ORM\Table(name: 'BillingPayer')]
+#[ORM\InheritanceType('SINGLE_TABLE')]
+#[ORM\DiscriminatorColumn(name: 'discr', type: 'string')]
+#[ORM\DiscriminatorMap(['access' => 'AccessPayer', 'educationalproject' => 'EducationalProjectPayer'])]
+abstract class AbstractBillingPayer
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['accesspayer', 'educationalprojectpayer', 'access_details', 'student_registration', 'educationalproject_details', 'payer_list', 'accessbilling_edit'])]
+    private $id;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: false)]
+    #[Assert\Type(type: 'float')]
+    #[Assert\NotNull]
+    #[Groups(['accesspayer', 'educationalprojectpayer', 'access_details_billingpayers', 'student_registration_billingreceivers', 'educationalproject_details_billingreceivers', 'payer_list_billingpayers', 'accessbilling_edit_billingreceivers', 'accessbilling_edit_billingpayers', 'accessbilling_edit_billingeducationalprojectpayers'])]
+    private $paymentPart;
+    /**
+     * The constructor
+     */
+    public function __construct() {
+
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set paymentPart
+     *
+     * @param float $paymentPart
+     *
+     * @return AbstractBillingPayer
+     */
+    public function setPaymentPart($paymentPart)
+    {
+        $this->paymentPart = floatval($paymentPart);
+
+        return $this;
+    }
+    /**
+     * Get paymentPart
+     *
+     * @return float
+     */
+    public function getPaymentPart()
+    {
+        return $this->paymentPart;
+    }
+}

+ 507 - 0
old/Entity/Billing/AccessBilling.php

@@ -0,0 +1,507 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+use AppBundle\Validator\Constraints\Billing as OpentalentAssert;
+
+/**
+ * Paramètres de facturation pour un Access
+ *
+ * @Iri("http://schema.org/AccessBilling")
+ * @OpentalentAssert\CustomerId
+ */
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\Billing\Repository\AccessBillingRepository')]
+class AccessBilling
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['accessbilling', 'access_mass', 'access_details', 'access_details_accessbilling', 'student_registration', 'student_registration_guardians', 'accesses_list', 'student_list', 'guardians_list', 'adherent_list', 'personnels_list', 'payer_list', 'accessbilling_edit', 'sepa_debit_mandate', 'fusion_accesses', 'online_registration_access_details', 'account_balance_reimbursements', 'billpayment_list'])]
+    private $id;
+    /**
+     * @var Access
+     */
+    #[Assert\Valid]
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'accessBilling', cascade: ['persist'], fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: true, onDelete: 'CASCADE')]
+    #[Groups(['accessbilling', 'billpayment_list_accessbillingaccountbalancereimbursement'])]
+    private $access;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['accessbilling', 'student_registration_accessbilling', 'student_registration_guardians', 'payer_list_accessbilling', 'accessbilling_edit_accessbilling'])]
+    private $customerId;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\PaymentChoiceEnum', 'toArray'])]
+    #[Groups(['accessbilling', 'student_registration_accessbilling', 'student_registration_guardians', 'bill_list_access', 'payer_list_accessbilling', 'accessbilling_edit_accessbilling', 'online_registration_access_details_accessbilling', 'build_bills_billlines', 'build_bills_access'])]
+    private $paymentChoice;
+    /**
+     * @var FamilyQuotient
+     */
+    #[Assert\Valid]
+    #[ORM\ManyToOne(targetEntity: 'FamilyQuotient', cascade: ['persist'], inversedBy: 'accessBilling')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['accessbilling', 'student_registration_accessbilling', 'student_registration_accessbilling', 'access_mass_accessbilling', 'payer_list_accessbilling', 'accessbilling_edit_accessbilling', 'fusion_accesses_accessbilling', 'student_list_accessbilling'])]
+    private $familyQuotient;
+    /**
+     * @var ResidenceArea
+     */
+    #[Assert\Valid]
+    #[ORM\ManyToOne(targetEntity: 'ResidenceArea', cascade: ['persist'], inversedBy: 'accessBilling')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['accessbilling', 'access_details_accessbilling', 'access_mass_accessbilling', 'student_registration_accessbilling', 'accesses_list_accessbilling', 'student_list_accessbilling', 'guardians_list_accessbilling', 'adherent_list_accessbilling', 'personnels_list_accessbilling', 'payer_list_accessbilling', 'accessbilling_edit_accessbilling', 'fusion_accesses_accessbilling', 'online_registration_access_details_accessbilling'])]
+    private $residenceArea;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\PeriodicityPaymentEnum', 'toArray'])]
+    #[Groups(['accessbilling', 'student_registration_accessbilling', 'student_registration_guardians', 'payer_list_accessbilling', 'accessbilling_edit_accessbilling', 'sepa_debit_mandate_accessbilling'])]
+    private $periodicityPayment;
+    /**
+     * @var ArrayCollection<Billpayment>
+     */
+    #[ORM\OneToMany(targetEntity: 'BillPayment', mappedBy: 'accessBilling', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['accessbilling_billpayment'])]
+    private $billDetachedPayments;
+    /**
+     * @var ArrayCollection<BillDebitBalance>
+     */
+    #[ORM\OneToMany(targetEntity: 'BillDebitBalance', mappedBy: 'accessBilling', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['accessbilling_billdebitbalance'])]
+    private $billDebitBalances;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', options: ['default' => 'APPLY_ADHESION'])]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\AdhesionChoiceEnum', 'toArray'])]
+    #[Groups(['accessbilling', 'student_registration_accessbilling', 'student_registration_guardians', 'accessbilling_edit_accessbilling'])]
+    private $adhesionChoice = "APPLY_ADHESION";
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['accessbilling', 'student_registration_accessbilling', 'student_registration_guardians', 'accessbilling_edit_accessbilling'])]
+    private $adhesionAmount;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true, options: ['default' => '0.0'])]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['accessbilling', 'payer_list_accessbilling'])]
+    private $accountBalance = 0.0;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['accessbilling'])]
+    private $accountBalanceUpdateDate;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true, options: ['default' => '0.0'])]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['accessbilling'])]
+    private $reportPaymentsAmount = 0.0;
+    /**
+     * @var ArrayCollection<Billpayment>
+     */
+    #[ORM\OneToMany(targetEntity: 'BillPayment', mappedBy: 'accessBillingAccountBalanceReimbursement', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['accessbilling_accountbalancereimbursements', 'account_balance_reimbursements_accessbilling'])]
+    private $accountBalanceReimbursements;
+    /**
+     * The constructor
+     */
+    public function __construct() {
+        $this->billDetachedPayments = new ArrayCollection();
+        $this->billDebitBalances = new ArrayCollection();
+        $this->accountBalanceReimbursements = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set customerId
+     *
+     * @param string $customerId
+     *
+     * @return AccessBilling
+     */
+    public function setCustomerId($customerId = null)
+    {
+        if(empty($customerId))
+            $customerId = null;
+        $this->customerId = $customerId;
+
+        return $this;
+    }
+    /**
+     * Get customerId
+     *
+     * @return string
+     */
+    public function getCustomerId()
+    {
+        return $this->customerId;
+    }
+    /**
+     * Set paymentChoice
+     *
+     * @param string $paymentChoice
+     *
+     * @return AccessBilling
+     */
+    public function setPaymentChoice($paymentChoice)
+    {
+        $this->paymentChoice = $paymentChoice;
+
+        return $this;
+    }
+    /**
+     * Get paymentChoice
+     *
+     * @return string
+     */
+    public function getPaymentChoice()
+    {
+        return $this->paymentChoice;
+    }
+    /**
+     * Set familyQuotient
+     *
+     * @param \AppBundle\Entity\Billing\FamilyQuotient $familyQuotient
+     *
+     * @return AccessBilling
+     */
+    public function setFamilyQuotient(\AppBundle\Entity\Billing\FamilyQuotient $familyQuotient = null)
+    {
+        $this->familyQuotient = $familyQuotient;
+
+        return $this;
+    }
+    /**
+     * Get familyQuotient
+     *
+     * @return \AppBundle\Entity\Billing\FamilyQuotient
+     */
+    public function getFamilyQuotient()
+    {
+        return $this->familyQuotient;
+    }
+    /**
+     * Set residenceArea
+     *
+     * @param \AppBundle\Entity\Billing\ResidenceArea $residenceArea
+     *
+     * @return AccessBilling
+     */
+    public function setResidenceArea(\AppBundle\Entity\Billing\ResidenceArea $residenceArea = null)
+    {
+        $this->residenceArea = $residenceArea;
+
+        return $this;
+    }
+    /**
+     * Get residenceArea
+     *
+     * @return \AppBundle\Entity\Billing\ResidenceArea
+     */
+    public function getResidenceArea()
+    {
+        return $this->residenceArea;
+    }
+    /**
+     * Set access
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $access
+     *
+     * @return AccessBilling
+     */
+    public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access = null)
+    {
+        $this->access = $access;
+
+        return $this;
+    }
+    /**
+     * Get access
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getAccess()
+    {
+        return $this->access;
+    }
+    /**
+     * Set periodicityPayment
+     *
+     * @param string $periodicityPayment
+     *
+     * @return AccessBilling
+     */
+    public function setPeriodicityPayment($periodicityPayment)
+    {
+        $this->periodicityPayment = $periodicityPayment;
+
+        return $this;
+    }
+    /**
+     * Get periodicityPayment
+     *
+     * @return string
+     */
+    public function getPeriodicityPayment()
+    {
+        return $this->periodicityPayment;
+    }
+    /**
+     * Add billDetachedPayment
+     *
+     * @param \AppBundle\Entity\Billing\BillPayment $billDetachedPayment
+     *
+     * @return AccessBilling
+     */
+    public function addBillDetachedPayment(\AppBundle\Entity\Billing\BillPayment $billDetachedPayment)
+    {
+        $billDetachedPayment->setAccessBilling($this);
+        $this->billDetachedPayments[] = $billDetachedPayment;
+
+        return $this;
+    }
+    /**
+     * Remove billDetachedPayment
+     *
+     * @param \AppBundle\Entity\Billing\BillPayment $billDetachedPayment
+     */
+    public function removeBillDetachedPayment(\AppBundle\Entity\Billing\BillPayment $billDetachedPayment)
+    {
+        $this->billDetachedPayments->removeElement($billDetachedPayment);
+    }
+    /**
+     * Get billDetachedPayments
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBillDetachedPayments()
+    {
+        return $this->billDetachedPayments;
+    }
+    /**
+     * Add billDebitBalance
+     *
+     * @param \AppBundle\Entity\Billing\BillDebitBalance $billDebitBalance
+     *
+     * @return AccessBilling
+     */
+    public function addBillDebitBalance(\AppBundle\Entity\Billing\BillDebitBalance $billDebitBalance)
+    {
+        $billDebitBalance->setAccessBilling($this);
+        $this->billDebitBalances[] = $billDebitBalance;
+
+        return $this;
+    }
+    /**
+     * Remove billDebitBalance
+     *
+     * @param \AppBundle\Entity\Billing\BillDebitBalance $billDebitBalance
+     */
+    public function removeBillDebitBalance(\AppBundle\Entity\Billing\BillDebitBalance $billDebitBalance)
+    {
+        $this->billDebitBalances->removeElement($billDebitBalance);
+    }
+    /**
+     * Get billDebitBalances
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBillDebitBalances()
+    {
+        return $this->billDebitBalances;
+    }
+    /**
+     * Set adhesionChoice
+     *
+     * @param string $adhesionChoice
+     *
+     * @return AccessBilling
+     */
+    public function setAdhesionChoice($adhesionChoice)
+    {
+        $this->adhesionChoice = $adhesionChoice;
+
+        return $this;
+    }
+    /**
+     * Get adhesionChoice
+     *
+     * @return string
+     */
+    public function getAdhesionChoice()
+    {
+        return $this->adhesionChoice;
+    }
+    /**
+     * Set adhesionAmount
+     *
+     * @param float $adhesionAmount
+     *
+     * @return AccessBilling
+     */
+    public function setAdhesionAmount($adhesionAmount)
+    {
+        $this->adhesionAmount = floatval($adhesionAmount);
+
+        return $this;
+    }
+    /**
+     * Get adhesionAmount
+     *
+     * @return float
+     */
+    public function getAdhesionAmount()
+    {
+        return $this->adhesionAmount;
+    }
+    /**
+     * Set accountBalance
+     *
+     * @param float $accountBalance
+     *
+     * @return AccessBilling
+     */
+    public function setAccountBalance($accountBalance)
+    {
+        $this->accountBalance = $accountBalance;
+
+        return $this;
+    }
+    /**
+     * Get accountBalance
+     *
+     * @return float
+     */
+    public function getAccountBalance()
+    {
+        return $this->accountBalance;
+    }
+    /**
+     * Set accountBalanceUpdateDate
+     *
+     * @param \DateTime $accountBalanceUpdateDate
+     *
+     * @return AccessBilling
+     */
+    public function setAccountBalanceUpdateDate($accountBalanceUpdateDate)
+    {
+        $this->accountBalanceUpdateDate = $accountBalanceUpdateDate;
+
+        return $this;
+    }
+    /**
+     * Get accountBalanceUpdateDate
+     *
+     * @return \DateTime
+     */
+    public function getAccountBalanceUpdateDate()
+    {
+        return $this->accountBalanceUpdateDate;
+    }
+    /**
+     * Set reportPaymentsAmount
+     *
+     * @param float $reportPaymentsAmount
+     *
+     * @return AccessBilling
+     */
+    public function setReportPaymentsAmount($reportPaymentsAmount)
+    {
+        $this->reportPaymentsAmount = $reportPaymentsAmount;
+
+        return $this;
+    }
+    /**
+     * Get reportPaymentsAmount
+     *
+     * @return float
+     */
+    public function getReportPaymentsAmount()
+    {
+        return $this->reportPaymentsAmount;
+    }
+    /**
+     * Add accountBalanceReimbursement
+     *
+     * @param \AppBundle\Entity\Billing\BillPayment $accountBalanceReimbursement
+     *
+     * @return AccessBilling
+     */
+    public function addAccountBalanceReimbursement(\AppBundle\Entity\Billing\BillPayment $accountBalanceReimbursement)
+    {
+        $accountBalanceReimbursement->setAccessBillingAccountBalanceReimbursement($this);
+        $this->accountBalanceReimbursements[] = $accountBalanceReimbursement;
+
+        return $this;
+    }
+    /**
+     * Remove accountBalanceReimbursement
+     *
+     * @param \AppBundle\Entity\Billing\BillPayment $accountBalanceReimbursement
+     */
+    public function removeAccountBalanceReimbursement(\AppBundle\Entity\Billing\BillPayment $accountBalanceReimbursement)
+    {
+        $this->accountBalanceReimbursements->removeElement($accountBalanceReimbursement);
+    }
+    /**
+     * Get accountBalanceReimbursements
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getAccountBalanceReimbursements()
+    {
+        return $this->accountBalanceReimbursements;
+    }
+}

+ 198 - 0
old/Entity/Billing/AccessFictionalIntangible.php

@@ -0,0 +1,198 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\AccessAndFunction\AccessFamily;
+use AppBundle\Entity\Organization\Organization;
+use AppBundle\Entity\Product\FictionalIntangible;
+use AppBundle\Entity\Product\Intangible;
+use AppBundle\Entity\Traits\BillingRuleTrait;
+use AppBundle\Entity\Traits\LockableTrait;
+use AppBundle\Enum\Billing\PeriodicityTypeEnum;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Validator\Constraints as Assert;
+use Doctrine\Common\Collections\ArrayCollection;
+use Symfony\Component\Serializer\Annotation\Groups;
+use AppBundle\Annotation\DefaultField;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Correspond à une ligne de facturation pour un Access
+ * (@see FictionalIntangible)
+ *
+ * @Iri("http://schema.org/AccessFictionalIntangible")
+ */
+#[ORM\Entity]
+class AccessFictionalIntangible
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    use BillingRuleTrait;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['accessfictionalintangible'])]
+    private $id;
+    /**
+     * @var Access
+     */
+    #[Assert\Valid]
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'accessFictionalIntangibles', cascade: ['persist'])]
+    #[Groups(['accessfictionalintangible'])]
+    private $access;
+    /**
+     * @var AccessFamily
+     */
+    #[Assert\Valid]
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\AccessFamily', inversedBy: 'accessFictionalIntangibles', cascade: ['persist'])]
+    #[Groups(['accessfictionalintangible'])]
+    private $accessFamily;
+    /**
+     * @var FictionalIntangible
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Product\FictionalIntangible')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['accessfictionalintangible'])]
+    private $fictionalIntangible;
+    /**
+     * @var ArrayCollection<BillingIntangibleExcludeDate>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'BillingIntangibleExcludeDate', mappedBy: 'accessFictionalIntangible', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['accessfictionalintangible'])]
+    private $billingIntangibleExcludeDates;
+    /**
+     * The constructor
+     */
+    public function __construct() {
+        $this->billingIntangibleExcludeDates = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set access
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $access
+     *
+     * @return AccessFictionalIntangible
+     */
+    public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access = null)
+    {
+        $access->addAccessFictionalIntangible($this);
+        $this->access = $access;
+
+        return $this;
+    }
+    /**
+     * Get access
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getAccess()
+    {
+        return $this->access;
+    }
+    /**
+     * Set fictionalIntangible
+     *
+     * @param \AppBundle\Entity\Product\FictionalIntangible $fictionalIntangible
+     *
+     * @return AccessFictionalIntangible
+     */
+    public function setFictionalIntangible(\AppBundle\Entity\Product\FictionalIntangible $fictionalIntangible)
+    {
+        $this->fictionalIntangible = $fictionalIntangible;
+
+        return $this;
+    }
+    /**
+     * Get fictionalIntangible
+     *
+     * @return \AppBundle\Entity\Product\FictionalIntangible
+     */
+    public function getFictionalIntangible()
+    {
+        return $this->fictionalIntangible;
+    }
+    /**
+     * Set accessFamily
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\AccessFamily $accessFamily
+     *
+     * @return AccessFictionalIntangible
+     */
+    public function setAccessFamily(\AppBundle\Entity\AccessAndFunction\AccessFamily $accessFamily = null)
+    {
+        $accessFamily->addAccessFictionalIntangible($this);
+        $this->accessFamily = $accessFamily;
+
+        return $this;
+    }
+    /**
+     * Get accessFamily
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\AccessFamily
+     */
+    public function getAccessFamily()
+    {
+        return $this->accessFamily;
+    }
+    /**
+     * Add billingIntangibleExcludeDate
+     *
+     * @param \AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate
+     *
+     * @return AccessFictionalIntangible
+     */
+    public function addBillingIntangibleExcludeDate(\AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate)
+    {
+        $this->billingIntangibleExcludeDates[] = $billingIntangibleExcludeDate;
+
+        return $this;
+    }
+    /**
+     * Remove billingIntangibleExcludeDate
+     *
+     * @param \AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate
+     */
+    public function removeBillingIntangibleExcludeDate(\AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate)
+    {
+        $this->billingIntangibleExcludeDates->removeElement($billingIntangibleExcludeDate);
+    }
+    /**
+     * Get billingIntangibleExcludeDates
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBillingIntangibleExcludeDates()
+    {
+        return $this->billingIntangibleExcludeDates;
+    }
+}

+ 144 - 0
old/Entity/Billing/AccessIntangible.php

@@ -0,0 +1,144 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Product\Intangible;
+use AppBundle\Entity\Traits\LockableTrait;
+use AppBundle\Enum\Billing\PeriodicityTypeEnum;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+
+/**
+ * Enregistrement d'un produit à facturer par un Access
+ *
+ * @Iri("http://schema.org/AccessIntangible")
+ */
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\Billing\Repository\AccessIntangibleRepository')]
+class AccessIntangible extends AbstractBillingIntangible
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    use LockableTrait;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'accessIntangibles')]
+    #[Groups(['accessintangible', 'access_intangible_list'])]
+    private $access;
+    /**
+     * @var ArrayCollection<BillingIntangibleExcludeDate>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'BillingIntangibleExcludeDate', mappedBy: 'accessIntangible', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['accessintangible', 'student_registration_accessintangibles', 'accessbilling_edit_accessintangibles'])]
+    private $billingIntangibleExcludeDates;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['accessintangible', 'educationalprojectintangible', 'student_registration_accessintangibles', 'accessbilling_edit_accessintangibles'])]
+    private $unitPrice;
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+        parent::__construct();
+        $this->billingIntangibleExcludeDates = new ArrayCollection();
+    }
+    /**
+     * Set access
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $access
+     *
+     * @return AccessIntangible
+     */
+    public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access)
+    {
+        $this->access = $access;
+
+        return $this;
+    }
+    /**
+     * Get access
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getAccess()
+    {
+        return $this->access;
+    }
+    /**
+     * applyLock
+     */
+    public function applyLock()
+    {
+//        if(!is_null($this->getExcludeRule()) && $this->getIntangible()->getBillingPeriodicityType() === PeriodicityTypeEnum::PUNCTUAL){
+//            $this->setLockable(true);
+//        }
+    }
+    public function adminCanChange(){
+        return false;
+    }
+    /**
+     * Add billingIntangibleExcludeDate
+     *
+     * @param \AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate
+     *
+     * @return AccessIntangible
+     */
+    public function addBillingIntangibleExcludeDate(\AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate)
+    {
+        $this->billingIntangibleExcludeDates[] = $billingIntangibleExcludeDate;
+
+        return $this;
+    }
+    /**
+     * Remove billingIntangibleExcludeDate
+     *
+     * @param \AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate
+     */
+    public function removeBillingIntangibleExcludeDate(\AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate)
+    {
+        $this->billingIntangibleExcludeDates->removeElement($billingIntangibleExcludeDate);
+    }
+    /**
+     * Get billingIntangibleExcludeDates
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBillingIntangibleExcludeDates()
+    {
+        return $this->billingIntangibleExcludeDates;
+    }
+    /**
+     * Set unitPrice
+     *
+     * @param float $unitPrice
+     *
+     * @return AccessIntangible
+     */
+    public function setUnitPrice($unitPrice)
+    {
+        $this->unitPrice = floatval($unitPrice);
+
+        return $this;
+    }
+    /**
+     * Get unitPrice
+     *
+     * @return float
+     */
+    public function getUnitPrice()
+    {
+        return $this->unitPrice;
+    }
+}

+ 98 - 0
old/Entity/Billing/AccessPayer.php

@@ -0,0 +1,98 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Annotation\ExportSplitFields;
+use AppBundle\Entity\AccessAndFunction\Access;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Fais le lien entre l'Access qui règle la facture et l'Access concerné
+ *
+ *
+ * @Iri("http://schema.org/AccessPayer")
+ */
+#[ORM\Entity]
+class AccessPayer extends AbstractBillingPayer
+{
+    /**
+     * @var Access
+     */
+    #[Assert\Valid]
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'billingPayers')]
+    #[Groups(['accesspayer', 'access_details_billingpayers', 'student_registration_billingreceivers', 'accessbilling_edit_billingreceivers', 'access_intangible_list_access'])]
+    private $accessPayer;
+    /**
+     * @var Access
+     */
+    #[Assert\Valid]
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'billingReceivers')]
+    #[Groups(['accesspayer', 'access_details_billingpayers', 'student_registration_billingreceivers', 'payer_list_billingpayers', 'accessbilling_edit_billingpayers'])]
+    private $accessReceiver;
+    /**
+     * @var string
+     * @ExportSplitFields({"accessReceiver.person.name","accessReceiver.person.givenName","paymentPart"})
+     */
+    #[Groups(['template', 'payer_list_billingpayers'])]
+    private $fullLabelReceiverTemplate;
+    /**
+     * Set accessPayer
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $accessPayer
+     *
+     * @return AccessPayer
+     */
+    public function setAccessPayer(\AppBundle\Entity\AccessAndFunction\Access $accessPayer)
+    {
+        $this->accessPayer = $accessPayer;
+
+        return $this;
+    }
+    /**
+     * Get accessPayer
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getAccessPayer()
+    {
+        return $this->accessPayer;
+    }
+    /**
+     * Set accessReceiver
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $accessReceiver
+     *
+     * @return AccessPayer
+     */
+    public function setAccessReceiver(\AppBundle\Entity\AccessAndFunction\Access $accessReceiver)
+    {
+        $this->accessReceiver = $accessReceiver;
+
+        return $this;
+    }
+    /**
+     * Get accessReceiver
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getAccessReceiver()
+    {
+        return $this->accessReceiver;
+    }
+    /**
+     * @return array
+     */
+    public function getFullLabelReceiverTemplate()
+    {
+        return  [
+            $this->getAccessReceiver()->getPerson()->getFullNameTemplate(),
+            $this->getPaymentPart().'%'
+        ];
+    }
+}

+ 26 - 0
old/Entity/Billing/AdvancePayment.php

@@ -0,0 +1,26 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Core\File;
+use AppBundle\Entity\Traits\ActivityYearTrait;
+use AppBundle\Enum\Billing\PaymentChoiceEnum;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use AppBundle\Annotation\DefaultField;
+
+/**
+ * Facture
+ *
+ * @Iri("http://schema.org/AdvancePayment")
+ */
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\Billing\Repository\AdvancePaymentRepository')]
+class AdvancePayment extends BillAccounting implements BillAccountingInterface
+{
+}

+ 162 - 0
old/Entity/Billing/BergerLevrault.php

@@ -0,0 +1,162 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Booking\EducationalProject;
+use AppBundle\Entity\Core\File;
+use AppBundle\Entity\Product\EquipmentLoan;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+use Doctrine\Common\Collections\ArrayCollection;
+
+
+/**
+ * Fais le lien entre les Bill concernées par l'export et le File généré
+ * NB: BergerLevrault est un format de données demandé par le Trésor Public pour l'export des données comptables
+ *
+ * @Iri("http://schema.org/BergerLevrault")
+ */
+#[ORM\Entity]
+class BergerLevrault
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['bergerlevrault'])]
+    private $id;
+    /**
+     * @var ArrayCollection<Bill>
+     */
+    #[ORM\OneToMany(targetEntity: 'Bill', mappedBy: 'bergerLevrault', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['bergerlevrault_bills'])]
+    private $bills;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['bergerlevrault', 'bergerlevrault_list'])]
+    private $date;
+    /**
+     * @var File
+     */
+    #[Assert\Valid]
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Core\File', cascade: ['persist'], fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['bergerlevrault', 'bergerlevrault_list'])]
+    private $file;
+    /**
+     * The constructor
+     */
+    public function __construct() {
+        $this->bills = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set date
+     *
+     * @param \DateTime $date
+     *
+     * @return BergerLevrault
+     */
+    public function setDate($date)
+    {
+        $this->date = $date;
+
+        return $this;
+    }
+    /**
+     * Get date
+     *
+     * @return \DateTime
+     */
+    public function getDate()
+    {
+        return $this->date;
+    }
+    /**
+     * Add bill
+     *
+     * @param \AppBundle\Entity\Billing\Bill $bill
+     *
+     * @return BergerLevrault
+     */
+    public function addBill(\AppBundle\Entity\Billing\Bill $bill)
+    {
+        $this->bills[] = $bill;
+
+        return $this;
+    }
+    /**
+     * Remove bill
+     *
+     * @param \AppBundle\Entity\Billing\Bill $bill
+     */
+    public function removeBill(\AppBundle\Entity\Billing\Bill $bill)
+    {
+        $this->bills->removeElement($bill);
+    }
+    /**
+     * Get bills
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBills()
+    {
+        return $this->bills;
+    }
+    /**
+     * Set file
+     *
+     * @param \AppBundle\Entity\Core\File $file
+     *
+     * @return BergerLevrault
+     */
+    public function setFile(\AppBundle\Entity\Core\File $file = null)
+    {
+        $this->file = $file;
+
+        return $this;
+    }
+    /**
+     * Get file
+     *
+     * @return \AppBundle\Entity\Core\File
+     */
+    public function getFile()
+    {
+        return $this->file;
+    }
+}

+ 25 - 0
old/Entity/Billing/Bill.php

@@ -0,0 +1,25 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Core\File;
+use AppBundle\Enum\Billing\PaymentChoiceEnum;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use AppBundle\Annotation\DefaultField;
+
+/**
+ * Facture
+ *
+ * @Iri("http://schema.org/Bill")
+ */
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\Billing\Repository\BillRepository')]
+class Bill extends BillAccounting implements BillAccountingInterface
+{
+}

+ 468 - 0
old/Entity/Billing/BillAccessDetail.php

@@ -0,0 +1,468 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Paramètres d'un Access pour une Bill
+ *
+ * @Iri("http://schema.org/BillAccessDetail")
+ */
+#[ORM\Entity]
+class BillAccessDetail
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['billaccessdetail', 'billaccounting_list', 'bill_list', 'billcredit_list', 'build_bills'])]
+    private $id;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[Groups(['billaccessdetail', 'billaccounting_list_accessdetail', 'bill_list_accessdetail', 'billpayment_list_bill', 'billcredit_list_accessdetail'])]
+    private $accessId;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billaccessdetail', 'billaccounting_list_accessdetail', 'bill_list_accessdetail', 'billpayment_list_bill', 'billcredit_list_accessdetail'])]
+    private $customerId;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billaccessdetail', 'billaccounting_list_accessdetail', 'bill_list_accessdetail', 'billcredit_list_accessdetail'])]
+    private $familyQuotientSliceName;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billaccessdetail', 'billaccounting_list_accessdetail', 'bill_list_accessdetail', 'billcredit_list_accessdetail'])]
+    private $residenceAreaLabel;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\PeriodicityPaymentEnum', 'toArray'])]
+    #[Groups(['billaccessdetail', 'billaccounting_list_accessdetail', 'bill_list_accessdetail', 'billcredit_list_accessdetail'])]
+    private $periodicityPayment;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\PaymentChoiceEnum', 'toArray'])]
+    #[Groups(['billaccessdetail', 'billaccounting_list_accessdetail', 'bill_list_accessdetail', 'billcredit_list_accessdetail'])]
+    private $paymentChoice;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billaccessdetail', 'billaccounting_list_accessdetail', 'bill_list_accessdetail', 'billcredit_list_accessdetail'])]
+    private $streetAddress;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 20, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billaccessdetail', 'billaccounting_list_accessdetail', 'bill_list_accessdetail', 'billcredit_list_accessdetail'])]
+    private $postalCode;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billaccessdetail', 'billaccounting_list_accessdetail', 'bill_list_accessdetail', 'billcredit_list_accessdetail'])]
+    private $addressCity;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Length(max: 255, maxMessage: 'invalid-max-length')]
+    #[Groups(['billaccessdetail', 'billaccounting_list_accessdetail', 'bill_list_accessdetail', 'billcredit_list_accessdetail'])]
+    private $bankName;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 11, nullable: true)]
+    #[Groups(['billaccessdetail', 'billaccounting_list_accessdetail', 'bill_list_accessdetail', 'billcredit_list_accessdetail', 'build_bills_accessdetail'])]
+    private $bic;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 34, nullable: true)]
+    #[Groups(['billaccessdetail', 'billaccounting_list_accessdetail', 'bill_list_accessdetail', 'billcredit_list_accessdetail', 'build_bills_accessdetail'])]
+    private $iban;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billaccessdetail', 'billaccounting_list_accessdetail', 'bill_list_accessdetail', 'billcredit_list_accessdetail', 'build_bills_accessdetail'])]
+    private $holder;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 35, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billaccessdetail', 'billaccounting_list_accessdetail', 'bill_list_accessdetail', 'billcredit_list_accessdetail', 'build_bills_accessdetail'])]
+    #[Assert\Length(max: 35, maxMessage: 'invalid-max-length')]
+    private $rum;
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set accessId
+     *
+     * @param integer $accessId
+     *
+     * @return BillAccessDetail
+     */
+    public function setAccessId($accessId)
+    {
+        $this->accessId = $accessId;
+
+        return $this;
+    }
+    /**
+     * Get accessId
+     *
+     * @return integer
+     */
+    public function getAccessId()
+    {
+        return $this->accessId;
+    }
+    /**
+     * Set customerId
+     *
+     * @param string $customerId
+     *
+     * @return BillAccessDetail
+     */
+    public function setCustomerId($customerId)
+    {
+        $this->customerId = $customerId;
+
+        return $this;
+    }
+    /**
+     * Get customerId
+     *
+     * @return string
+     */
+    public function getCustomerId()
+    {
+        return $this->customerId;
+    }
+    /**
+     * Set familyQuotientSliceName
+     *
+     * @param string $familyQuotientSliceName
+     *
+     * @return BillAccessDetail
+     */
+    public function setFamilyQuotientSliceName($familyQuotientSliceName)
+    {
+        $this->familyQuotientSliceName = $familyQuotientSliceName;
+
+        return $this;
+    }
+    /**
+     * Get familyQuotientSliceName
+     *
+     * @return string
+     */
+    public function getFamilyQuotientSliceName()
+    {
+        return $this->familyQuotientSliceName;
+    }
+    /**
+     * Set residenceAreaLabel
+     *
+     * @param string $residenceAreaLabel
+     *
+     * @return BillAccessDetail
+     */
+    public function setResidenceAreaLabel($residenceAreaLabel)
+    {
+        $this->residenceAreaLabel = $residenceAreaLabel;
+
+        return $this;
+    }
+    /**
+     * Get residenceAreaLabel
+     *
+     * @return string
+     */
+    public function getResidenceAreaLabel()
+    {
+        return $this->residenceAreaLabel;
+    }
+    /**
+     * Set periodicityPayment
+     *
+     * @param string $periodicityPayment
+     *
+     * @return BillAccessDetail
+     */
+    public function setPeriodicityPayment($periodicityPayment)
+    {
+        $this->periodicityPayment = $periodicityPayment;
+
+        return $this;
+    }
+    /**
+     * Get periodicityPayment
+     *
+     * @return string
+     */
+    public function getPeriodicityPayment()
+    {
+        return $this->periodicityPayment;
+    }
+    /**
+     * Set paymentChoice
+     *
+     * @param string $paymentChoice
+     *
+     * @return BillAccessDetail
+     */
+    public function setPaymentChoice($paymentChoice)
+    {
+        $this->paymentChoice = $paymentChoice;
+
+        return $this;
+    }
+    /**
+     * Get paymentChoice
+     *
+     * @return string
+     */
+    public function getPaymentChoice()
+    {
+        return $this->paymentChoice;
+    }
+    /**
+     * Set streetAddress
+     *
+     * @param string $streetAddress
+     *
+     * @return BillAccessDetail
+     */
+    public function setStreetAddress($streetAddress)
+    {
+        $this->streetAddress = $streetAddress;
+
+        return $this;
+    }
+    /**
+     * Get streetAddress
+     *
+     * @return string
+     */
+    public function getStreetAddress()
+    {
+        return $this->streetAddress;
+    }
+    /**
+     * Set postalCode
+     *
+     * @param string $postalCode
+     *
+     * @return BillAccessDetail
+     */
+    public function setPostalCode($postalCode)
+    {
+        $this->postalCode = $postalCode;
+
+        return $this;
+    }
+    /**
+     * Get postalCode
+     *
+     * @return string
+     */
+    public function getPostalCode()
+    {
+        return $this->postalCode;
+    }
+    /**
+     * Set addressCity
+     *
+     * @param string $addressCity
+     *
+     * @return BillAccessDetail
+     */
+    public function setAddressCity($addressCity)
+    {
+        $this->addressCity = $addressCity;
+
+        return $this;
+    }
+    /**
+     * Get addressCity
+     *
+     * @return string
+     */
+    public function getAddressCity()
+    {
+        return $this->addressCity;
+    }
+    /**
+     * Set bankName
+     *
+     * @param string $bankName
+     *
+     * @return BillAccessDetail
+     */
+    public function setBankName($bankName)
+    {
+        $this->bankName = $bankName;
+
+        return $this;
+    }
+    /**
+     * Get bankName
+     *
+     * @return string
+     */
+    public function getBankName()
+    {
+        return $this->bankName;
+    }
+    /**
+     * Set bic
+     *
+     * @param string $bic
+     *
+     * @return BillAccessDetail
+     */
+    public function setBic($bic)
+    {
+        $this->bic = $bic;
+
+        return $this;
+    }
+    /**
+     * Get bic
+     *
+     * @return string
+     */
+    public function getBic()
+    {
+        return $this->bic;
+    }
+    /**
+     * Set iban
+     *
+     * @param string $iban
+     *
+     * @return BillAccessDetail
+     */
+    public function setIban($iban)
+    {
+        $this->iban = $iban;
+
+        return $this;
+    }
+    /**
+     * Get iban
+     *
+     * @return string
+     */
+    public function getIban()
+    {
+        return $this->iban;
+    }
+    /**
+     * Set holder
+     *
+     * @param string $holder
+     *
+     * @return BillAccessDetail
+     */
+    public function setHolder($holder)
+    {
+        $this->holder = $holder;
+
+        return $this;
+    }
+    /**
+     * Get holder
+     *
+     * @return string
+     */
+    public function getHolder()
+    {
+        return $this->holder;
+    }
+    /**
+     * Set rum
+     *
+     * @param string $rum
+     *
+     * @return BillAccessDetail
+     */
+    public function setRum($rum)
+    {
+        $this->rum = $rum;
+
+        return $this;
+    }
+    /**
+     * Get rum
+     *
+     * @return string
+     */
+    public function getRum()
+    {
+        return $this->rum;
+    }
+}

+ 1539 - 0
old/Entity/Billing/BillAccounting.php

@@ -0,0 +1,1539 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Annotation\ExportTranslate;
+use AppBundle\Annotation\ExportSplitFields;
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Core\File;
+use AppBundle\Entity\Core\Tagg;
+use AppBundle\Enum\Billing\PaymentStateEnum;
+use AppBundle\Enum\Billing\PaymentTypeEnum;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Sabre\VObject\Property\VCard\DateTime;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use AppBundle\Entity\Organization\Organization;
+use Doctrine\Common\Collections\ArrayCollection;
+use AppBundle\Annotation\DefaultField;
+
+
+/**
+ * Facture ou avoir (@see Bill, BillCredit)
+ *
+ * @Iri("http://schema.org/BillAccounting")
+ */
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\Billing\Repository\BillRepository')]
+#[ORM\Table(name: 'BillAccounting')]
+#[ORM\InheritanceType('SINGLE_TABLE')]
+#[ORM\DiscriminatorColumn(name: 'discr', type: 'string')]
+#[ORM\DiscriminatorMap(['billaccounting' => 'BillAccounting', 'bill' => 'Bill', 'billcredit' => 'BillCredit', 'advancepayment' => 'AdvancePayment'])]
+class BillAccounting implements BillAccountingInterface
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['bill', 'billaccounting', 'billaccounting_list', 'bill_list', 'billcredit_list', 'billpayment_list', 'my_bills_show', 'advancepayment_list', 'advance_payment_schoolyear', 'build_bills', 'my_bills_show', 'advancepayment_list', 'advance_payment_schoolyear'])]
+    private $id;
+    /**
+     * @var Organization
+     *
+     * @DefaultField
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Organization\Organization')]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['billaccounting', 'bill', 'billcredit'])]
+    private $organization;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'bills')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['billaccounting', 'bill', 'advancepayment', 'billaccounting_list', 'bill_list', 'billpayment_list_bill', 'billcredit_list', 'advancepayment_list', 'build_bills', 'billcredit_list', 'advancepayment_list'])]
+    private $access;
+    /**
+     * @var BillAccessDetail
+     */
+    #[Assert\Valid]
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Billing\BillAccessDetail', cascade: ['persist'], orphanRemoval: true, fetch: 'EAGER')]
+    #[Groups(['billaccounting', 'bill', 'billaccounting_list', 'billpayment_list_bill', 'bill_list', 'billcredit_list', 'build_bills'])]
+    private $accessDetail;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['bill', 'billaccounting'])]
+    private $reference;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Groups(['bill', 'billaccounting', 'build_bills'])]
+    private $customerReference;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billaccounting', 'bill', 'advancepayment', 'billaccounting_list', 'bill_list', 'billaccounting_list_bill', 'billcredit_list', 'billpayment_list_bill', 'my_bills_show_bills', 'advancepayment_list', 'advancepayment_list_bill', 'build_bills', 'my_bills_show_bills', 'advancepayment_list', 'advancepayment_list_bill'])]
+    private $billNumber;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Groups(['bill', 'billaccounting', 'build_bills'])]
+    private $billNumberInteger;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Groups(['bill', 'billaccounting'])]
+    private $billCreditInteger;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['billaccounting', 'bill', 'advancepayment', 'billaccounting_list', 'bill_list', 'billpayment_list_bill', 'my_bills_show_bills', 'billcredit_list', 'advancepayment_list', 'build_bills', 'billcredit_list', 'advancepayment_list'])]
+    private $billingDate;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billaccounting', 'bill'])]
+    private $object;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billaccounting', 'bill', 'build_bills'])]
+    private $comments;
+    /**
+     * @var ArrayCollection<BillLine>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'BillLine', mappedBy: 'bill', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['billaccounting', 'bill_billline', 'billaccounting_list', 'billpayment_list_bill', 'bill_list', 'billaccounting_list_bill', 'billcredit_list_bill', 'build_bills'])]
+    private $billLines;
+    /**
+     * @var ArrayCollection<BillCredit>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'BillCredit', mappedBy: 'bill', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['billaccounting', 'bill_billcredit', 'billaccounting_list', 'bill_list', 'advancepayment_list', 'advance_payment_schoolyear'])]
+    private $billCredits;
+    /**
+     * @var ArrayCollection<BillPayment>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'BillPayment', mappedBy: 'bill', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['billaccounting', 'bill_billpayment', 'build_bills'])]
+    private $billPayments;
+    /**
+     * @var float
+     */
+    #[Assert\Type(type: 'float')]
+    #[Groups(['billaccounting', 'bill', 'billaccounting_list', 'bill_list', 'my_bills_show_bills', 'advancepayment_list', 'my_bills_show_bills', 'advancepayment_list', 'build_bills'])]
+    private $totalAmountSet;
+    /**
+     * @var float
+     */
+    #[Assert\Type(type: 'float')]
+    #[Groups(['billaccounting', 'bill', 'billaccounting_list', 'bill_list', 'my_bills_show_bills', 'advancepayment_list'])]
+    private $totalPending;
+    /**
+     * @var float
+     */
+    #[Assert\Type(type: 'float')]
+    #[Groups(['billaccounting', 'bill', 'billaccounting_list', 'bill_list', 'my_bills_show_bills', 'my_bills_show', 'build_bills'])]
+    private $totalRemainingDue;
+    /**
+     * @var string
+     * @ExportTranslate(true)
+     */
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billaccounting', 'bill', 'billaccounting_list', 'bill_list', 'my_bills_show_bills', 'advancepayment_list'])]
+    private $paymentState;
+    /**
+     * @var array
+     */
+    #[ORM\Column(type: 'json_array', nullable: true)]
+    #[Groups(['billaccounting', 'bill', 'build_bills'])]
+    private $reductionTotal;
+    /**
+     * @var BillPeriod
+     */
+    #[Assert\Valid]
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Billing\BillPeriod', cascade: ['persist'], orphanRemoval: true, fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['billaccounting', 'bill', 'billaccounting_list', 'bill_list', 'billpayment_list_bill', 'billcredit_list', 'billaccounting_billperiod', 'advancepayment_list', 'build_bills', 'billcredit_list', 'billaccounting_billperiod', 'advancepayment_list'])]
+    private $billPeriod;
+    /**
+     * @var BillTotalDetail
+     */
+    #[Assert\Valid]
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Billing\BillTotalDetail', cascade: ['persist'], orphanRemoval: true, fetch: 'EAGER')]
+    #[Groups(['billaccounting', 'bill', 'advancepayment', 'billaccounting_list', 'bill_list', 'my_bills_show_bills', 'billcredit_list', 'build_bills'])]
+    private $totalDetail;
+    /**
+     * @var File
+     */
+    #[Assert\Valid]
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Core\File', cascade: ['persist'], fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['billaccounting', 'bill', 'billaccounting_list', 'bill_list', 'billcredit_list', 'my_bills_show_bills'])]
+    private $file;
+    /**
+     * @var string
+     */
+    #[Groups(['billaccounting', 'billaccounting_list', 'bill'])]
+    private $billAccountingNumber;
+    /**
+     * @var string
+     * @ExportTranslate(true)
+     */
+    #[Groups(['billaccounting', 'billaccounting_list'])]
+    private $type;
+    /**
+     * @var Bill
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\BillAccounting', inversedBy: 'billCredits')]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['billaccounting', 'billcredit', 'billaccounting_list', 'billcredit_list', 'advancepayment_list', 'advance_payment_schoolyear'])]
+    private $bill;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billaccounting', 'billcredit', 'billcredit_list'])]
+    private $message;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billaccounting', 'billcredit', 'billaccounting_list', 'billcredit_list'])]
+    private $billCreditNumber;
+    /**
+     * @var ArrayCollection<BillingIntangibleExcludeDate>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'BillingIntangibleExcludeDate', mappedBy: 'bill', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['billaccounting', 'bill'])]
+    private $billingIntangibleExcludeDate;
+    /**
+     * @var Pes
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\Pes', inversedBy: 'bills', cascade: ['persist'])]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['billaccounting_list', 'billaccounting_pes'])]
+    private $pes;
+    /**
+     * @var BergerLevrault
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\BergerLevrault', inversedBy: 'bills', cascade: ['persist'])]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['billaccounting_list'])]
+    private $bergerLevrault;
+    /**
+     * @var BergerLevrault
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\Ciril', inversedBy: 'bills', cascade: ['persist'])]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['billaccounting_list'])]
+    private $ciril;
+    /**
+     * @var Jvs
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\Jvs', inversedBy: 'bills', cascade: ['persist'])]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['billaccounting_list', 'billaccounting_jvs'])]
+    private $jvs;
+    /**
+     * @var Jvs
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\SddBank', inversedBy: 'bills', cascade: ['persist'])]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['billaccounting_list'])]
+    private $sddBank;
+    /**
+     * @var Jvs
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\SddRegie', inversedBy: 'bills', cascade: ['persist'])]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['billaccounting_list'])]
+    private $sddRegie;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['billaccounting'])]
+    private $old = false;
+    /**
+     * @var array
+     */
+    #[Groups(['billaccounting', 'billaccounting_list', 'billpayment_list_bill', 'bill_list'])]
+    private $listStudents;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['billaccounting', 'bill', 'build_bills'])]
+    private $sepaSampling= false;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['billaccounting', 'bill', 'billaccounting_list', 'bill_list', 'billpayment_list_bill', 'build_bills'])]
+    private $samplingDate;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['bill', 'billaccounting', 'billaccounting_list', 'bill_list', 'my_bills_show_bills'])]
+    private $availabilityDate;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Groups(['bill'])]
+    protected $payfipPaymentToken;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Groups(['bill', 'build_bills'])]
+    protected $enforceableTitle;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['bill', 'billaccounting', 'billaccounting_list', 'bill_list', 'my_bills_show_bills'])]
+    private $limitPaymentDate;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Groups(['advancepayment', 'advancepayment_list'])]
+    private $startSchoolYear;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['advancepayment', 'advancepayment_list'])]
+    private $label;
+    /**
+     * @var bool
+     */
+    #[Assert\Type(type: 'boolean')]
+    #[Groups(['advancepayment_list'])]
+    private $isApplied;
+    /**
+     * @var ArrayCollection<Tagg>
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\Tagg', cascade: ['persist'], inversedBy: 'billAccountings')]
+    #[Assert\Valid]
+    #[ORM\JoinTable(name: 'tag_billAccounting', joinColumns: [], inverseJoinColumns: [])]
+    #[ORM\JoinColumn(name: 'billAccounting_id', referencedColumnName: 'id')]
+    #[ORM\JoinColumn(name: 'tag_id', referencedColumnName: 'id')]
+    #[Groups(['billaccounting_tags', 'manage_tags', 'billaccounting_list', 'bill_list', 'billcredit_list', 'advancepayment_list'])]
+    private $tags;
+    /**
+     * @var string
+     *
+     */
+    #[Groups(['template', 'billaccounting_list'])]
+    private $studentsTagsTemplate;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'datetime', nullable: true)]
+    #[Assert\Date]
+    private $payfipUrlDateTime;
+    /**
+     * The constructor
+     */
+    public function __construct() {
+        $this->billLines = new ArrayCollection();
+        $this->billCredits = new ArrayCollection();
+        $this->billPayments = new ArrayCollection();
+        $this->billingIntangibleExcludeDate = new ArrayCollection();
+        $this->tags = new ArrayCollection();
+    }
+    /**
+     * Get id
+     *
+     * @return integer
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Sets id
+     *
+     * @param int $id
+     * @return this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Set reference
+     *
+     * @param string $reference
+     *
+     * @return Bill
+     */
+    public function setReference($reference)
+    {
+        $this->reference = $reference;
+
+        return $this;
+    }
+    /**
+     * Get reference
+     *
+     * @return string
+     */
+    public function getReference()
+    {
+        return $this->reference;
+    }
+    /**
+     * Set billingDate
+     *
+     * @param \DateTime $billingDate
+     *
+     * @return Bill
+     */
+    public function setBillingDate($billingDate)
+    {
+        $this->billingDate = $billingDate;
+
+        return $this;
+    }
+    /**
+     * Get billingDate
+     *
+     * @return \DateTime
+     */
+    public function getBillingDate()
+    {
+        return $this->billingDate ? $this->billingDate->format('Y-m-d') : $this->billingDate;
+    }
+    /**
+     * Set object
+     *
+     * @param string $object
+     *
+     * @return Bill
+     */
+    public function setObject($object)
+    {
+        $this->object = $object;
+
+        return $this;
+    }
+    /**
+     * Get object
+     *
+     * @return string
+     */
+    public function getObject()
+    {
+        return $this->object;
+    }
+    /**
+     * Set comments
+     *
+     * @param string $comments
+     *
+     * @return Bill
+     */
+    public function setComments($comments)
+    {
+        $this->comments = $comments;
+
+        return $this;
+    }
+    /**
+     * Get comments
+     *
+     * @return string
+     */
+    public function getComments()
+    {
+        return $this->comments;
+    }
+    /**
+     * Set totalPrice
+     *
+     * @param float $totalPrice
+     *
+     * @return Bill
+     */
+    public function setTotalPrice($totalPrice)
+    {
+        $this->totalPrice = floatval($totalPrice);
+
+        return $this;
+    }
+    /**
+     * Get totalPrice
+     *
+     * @return float
+     */
+    public function getTotalPrice()
+    {
+        return $this->totalPrice;
+    }
+    /**
+     * Add billLine
+     *
+     * @param \AppBundle\Entity\Billing\BillLine $billLine
+     *
+     * @return BillAccounting
+     */
+    public function addBillLine(\AppBundle\Entity\Billing\BillLine $billLine)
+    {
+        $billLine->setBill($this);
+        $this->billLines[] = $billLine;
+
+        return $this;
+    }
+    /**
+     * Remove billLine
+     *
+     * @param \AppBundle\Entity\Billing\BillLine $billLine
+     */
+    public function removeBillLine(\AppBundle\Entity\Billing\BillLine $billLine)
+    {
+        $this->billLines->removeElement($billLine);
+    }
+    /**
+     * Get billLines
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBillLines()
+    {
+        return $this->billLines;
+    }
+    /**
+     * Set totalVat
+     *
+     * @param float $totalVat
+     *
+     * @return Bill
+     */
+    public function setTotalVat($totalVat)
+    {
+        $this->totalVat = floatval($totalVat);
+
+        return $this;
+    }
+    /**
+     * Get totalVat
+     *
+     * @return float
+     */
+    public function getTotalVat()
+    {
+        return $this->totalVat;
+    }
+    /**
+     * Set access
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $access
+     *
+     * @return Bill
+     */
+    public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access)
+    {
+        $this->access = $access;
+
+        return $this;
+    }
+    /**
+     * Get access
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getAccess()
+    {
+        return $this->access;
+    }
+    /**
+     * Add billCredit
+     *
+     * @param \AppBundle\Entity\Billing\BillCredit $billCredit
+     *
+     * @return Bill
+     */
+    public function addBillCredit(\AppBundle\Entity\Billing\BillCredit $billCredit)
+    {
+        $this->billCredits[] = $billCredit;
+        $billCredit->setBill($this);
+        return $this;
+    }
+    /**
+     * Remove billCredit
+     *
+     * @param \AppBundle\Entity\Billing\BillCredit $billCredit
+     */
+    public function removeBillCredit(\AppBundle\Entity\Billing\BillCredit $billCredit)
+    {
+        $this->billCredits->removeElement($billCredit);
+    }
+    /**
+     * Get billCredits
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBillCredits()
+    {
+        return $this->billCredits;
+    }
+    /**
+     * Add billPayment
+     *
+     * @param \AppBundle\Entity\Billing\BillPayment $billPayment
+     *
+     * @return Bill
+     */
+    public function addBillPayment(\AppBundle\Entity\Billing\BillPayment $billPayment)
+    {
+        $billPayment->setBill($this);
+        $this->billPayments[] = $billPayment;
+
+        return $this;
+    }
+    /**
+     * Remove billPayment
+     *
+     * @param \AppBundle\Entity\Billing\BillPayment $billPayment
+     */
+    public function removeBillPayment(\AppBundle\Entity\Billing\BillPayment $billPayment)
+    {
+        $this->billPayments->removeElement($billPayment);
+    }
+    /**
+     * Get billPayments
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBillPayments()
+    {
+        return $this->billPayments;
+    }
+    /**
+     * Get totalAmountSet
+     *
+     * @return float
+     */
+    public function getTotalAmountSet()
+    {
+        if(!is_null($this->getBill()) && get_class($this) !== AdvancePayment::class){
+            return 0;
+        }
+        $totalAmountSet = 0;
+        $billPayments = $this->getBillPayments();
+        foreach ($billPayments as $billPayment) {
+            if($billPayment->getIsAcquired()){
+                $totalAmountSet += $billPayment->getAmount();
+            }
+            foreach ($billPayment->getBillDebitBalances() as $billDebitBalances) {
+                if(!$billDebitBalances->getIsUsed())
+                    $totalAmountSet -= $billDebitBalances->getAmount();
+            }
+        }
+        return $totalAmountSet;
+    }
+    /**
+     * Get totalAmountSet
+     *
+     * @return float
+     */
+    public function getTotalPending()
+    {
+        if(!is_null($this->getBill())){
+            return 0;
+        }
+        $totalPending = 0;
+
+        $billPayments = $this->getBillPayments();
+        foreach ($billPayments as $billPayment) {
+            if(!$billPayment->getIsAcquired()){
+                $totalPending += $billPayment->getAmount();
+            }
+        }
+        return $totalPending;
+    }
+    /**
+     * Get totalRemainingDue
+     *
+     * @return float
+     */
+    public function getTotalRemainingDue()
+    {
+        if(!is_null($this->getBill()) || count($this->getBillCredits()) > 0 ){
+            return 0;
+        }
+        $totalRemainingDue = null;
+        if($this->totalDetail && !is_null($this->totalDetail)){
+            $totalRemainingDue = round(floatval($this->totalDetail->getTtc()) - $this->getTotalAmountSet(), 2);
+        }
+        return $totalRemainingDue;
+    }
+    /**
+     * Gets paymentState.
+     *
+     * @return string
+     */
+    public function getPaymentState()
+    {
+        if(!is_null($this->getBill()) || get_class($this) === AdvancePayment::class){
+            return PaymentStateEnum::SOLDIER;
+        }
+        if(count($this->getBillCredits()) > 0 ){
+            return PaymentStateEnum::SOLDIER;
+        }
+
+        $today = new \DateTime();
+        $totalAmountSet = 0;
+        $delayed = false;
+
+        $billPayments = $this->getBillPayments();
+        foreach ($billPayments as $billPayment) {
+            /** @var BillPayment $billPayment **/
+            if($billPayment->getIsAcquired()){
+                $totalAmountSet += $billPayment->getAmount();
+            }elseif(new \DateTime($billPayment->getReceiptDate()) < $today){
+                $delayed = true;
+            }
+            foreach ($billPayment->getBillDebitBalances() as $billDebitBalances) {
+                if(!$billDebitBalances->getIsUsed())
+                    $totalAmountSet -= $billDebitBalances->getAmount();
+            }
+        }
+        if($this->totalDetail && !is_null($this->totalDetail) && number_format(round($totalAmountSet,2),2,'','') >= number_format($this->totalDetail->getTtc(),2,'','')){
+            return PaymentStateEnum::SOLDIER;
+        }elseif($delayed){
+            return PaymentStateEnum::DELAYED;
+        }
+        return PaymentStateEnum::TO_CASH_IN;
+    }
+    /**
+     * Set billNumber
+     *
+     * @param string $billNumber
+     *
+     * @return Bill
+     */
+    public function setBillNumber($billNumber)
+    {
+        $this->billNumber = $billNumber;
+
+        return $this;
+    }
+    /**
+     * Get billNumber
+     *
+     * @return string
+     */
+    public function getBillNumber()
+    {
+        return $this->billNumber;
+    }
+    /**
+     * Set reductionTotal
+     *
+     * @param array $reductionTotal
+     *
+     * @return Bill
+     */
+    public function setReductionTotal($reductionTotal)
+    {
+        $this->reductionTotal = $reductionTotal;
+
+        return $this;
+    }
+    /**
+     * Get reductionTotal
+     *
+     * @return array
+     */
+    public function getReductionTotal()
+    {
+        return $this->reductionTotal;
+    }
+    /**
+     * Set customerReference
+     *
+     * @param integer $customerReference
+     *
+     * @return Bill
+     */
+    public function setCustomerReference($customerReference)
+    {
+        $this->customerReference = $customerReference;
+
+        return $this;
+    }
+    /**
+     * Get customerReference
+     *
+     * @return integer
+     */
+    public function getCustomerReference()
+    {
+        return $this->customerReference;
+    }
+    /**
+     * Set file
+     *
+     * @param \AppBundle\Entity\Core\File $file
+     *
+     * @return Bill
+     */
+    public function setFile(\AppBundle\Entity\Core\File $file = null)
+    {
+        $this->file = $file;
+
+        return $this;
+    }
+    /**
+     * Get file
+     *
+     * @return \AppBundle\Entity\Core\File
+     */
+    public function getFile()
+    {
+        return $this->file;
+    }
+    /**
+     * get billAccountingNumber
+     *
+     * @return mixed
+     */
+    public function getBillAccountingNumber()
+    {
+        $billAccountingNumber = '';
+        if(get_class($this) === Bill::class || get_class($this) === AdvancePayment::class){
+            $pes =  $this->organization->getSettings() && array_key_exists('Pes', $this->organization->getSettings()->getModules()) ? $this->organization->getSettings()->getModules()['Pes'] : false;
+
+            if($pes && $this->getBillNumberInteger()){
+                $billAccountingNumber = str_pad($this->getBillNumberInteger(), 13, '0', STR_PAD_LEFT);
+            }else{
+                $billAccountingNumber = $this->billNumber;
+            }
+        }
+        if(get_class($this) === BillCredit::class){
+            $billAccountingNumber = $this->billCreditNumber;
+        }
+        return $billAccountingNumber;
+    }
+    /**
+     * get billAccountingNumber
+     *
+     * @return mixed
+     */
+    public function getType()
+    {
+        $explodeClass = explode("\\",get_class($this));
+        return lcfirst(end($explodeClass));
+    }
+    /**
+     * Set organization
+     *
+     * @param \AppBundle\Entity\Organization\Organization $organization
+     *
+     * @return BillAccounting
+     */
+    public function setOrganization(\AppBundle\Entity\Organization\Organization $organization = null)
+    {
+        $this->organization = $organization;
+
+        return $this;
+    }
+    /**
+     * Get organization
+     *
+     * @return \AppBundle\Entity\Organization\Organization
+     */
+    public function getOrganization()
+    {
+        return $this->organization;
+    }
+    /**
+     * Set message
+     *
+     * @param string $message
+     *
+     * @return BillCredit
+     */
+    public function setMessage($message)
+    {
+        $this->message = $message;
+
+        return $this;
+    }
+    /**
+     * Get message
+     *
+     * @return string
+     */
+    public function getMessage()
+    {
+        return $this->message;
+    }
+    /**
+     * Set bill
+     *
+     * @param \AppBundle\Entity\Billing\BillAccounting $bill
+     *
+     * @return BillCredit
+     */
+    public function setBill(\AppBundle\Entity\Billing\BillAccounting $bill)
+    {
+        $this->bill = $bill;
+
+        return $this;
+    }
+    /**
+     * Get bill
+     *
+     * @return \AppBundle\Entity\Billing\Bill
+     */
+    public function getBill()
+    {
+        return $this->bill;
+    }
+    /**
+     * Set billCreditNumber
+     *
+     * @param string $billCreditNumber
+     *
+     * @return BillCredit
+     */
+    public function setBillCreditNumber($billCreditNumber)
+    {
+        $this->billCreditNumber = $billCreditNumber;
+
+        return $this;
+    }
+    /**
+     * Get billCreditNumber
+     *
+     * @return string
+     */
+    public function getBillCreditNumber()
+    {
+        return $this->billCreditNumber;
+    }
+    /**
+     * Add billingIntangibleExcludeDate
+     *
+     * @param \AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate
+     *
+     * @return BillAccounting
+     */
+    public function addBillingIntangibleExcludeDate(\AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate)
+    {
+        $billingIntangibleExcludeDate->setBill($this);
+        $this->billingIntangibleExcludeDate[] = $billingIntangibleExcludeDate;
+
+        return $this;
+    }
+    /**
+     * Remove billingIntangibleExcludeDate
+     *
+     * @param \AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate
+     */
+    public function removeBillingIntangibleExcludeDate(\AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate)
+    {
+        $this->billingIntangibleExcludeDate->removeElement($billingIntangibleExcludeDate);
+    }
+    /**
+     * Get billingIntangibleExcludeDate
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBillingIntangibleExcludeDate()
+    {
+        return $this->billingIntangibleExcludeDate;
+    }
+    /**
+     * Set pes
+     *
+     * @param \AppBundle\Entity\Billing\Pes $pes
+     *
+     * @return BillAccounting
+     */
+    public function setPes(\AppBundle\Entity\Billing\Pes $pes = null)
+    {
+        $this->pes = $pes;
+
+        return $this;
+    }
+    /**
+     * Get pes
+     *
+     * @return \AppBundle\Entity\Billing\Pes
+     */
+    public function getPes()
+    {
+        return $this->pes;
+    }
+    /**
+     * Set sddBank
+     *
+     * @param \AppBundle\Entity\Billing\SddBank $sddBank
+     *
+     * @return BillAccounting
+     */
+    public function setSddBank(SddBank $sddBank = null)
+    {
+        $this->sddBank = $sddBank;
+
+        return $this;
+    }
+    /**
+     * Get SddBank
+     *
+     * @return \AppBundle\Entity\Billing\SddBank
+     */
+    public function getSddBank()
+    {
+        return $this->sddBank;
+    }
+    /**
+     * Set SddRegie
+     *
+     * @param \AppBundle\Entity\Billing\SddRegie $sddRegie
+     *
+     * @return BillAccounting
+     */
+    public function setSddRegie(SddRegie $sddRegie= null)
+    {
+        $this->sddRegie = $sddRegie;
+
+        return $this;
+    }
+    /**
+     * Get SddRegie
+     *
+     * @return \AppBundle\Entity\Billing\SddRegie
+     */
+    public function getSddRegie()
+    {
+        return $this->sddRegie;
+    }
+    /**
+     * Set old
+     *
+     * @param boolean $old
+     *
+     * @return BillAccounting
+     */
+    public function setOld($old)
+    {
+        $this->old = $old;
+
+        return $this;
+    }
+    /**
+     * Get old
+     *
+     * @return boolean
+     */
+    public function getOld()
+    {
+        return $this->old;
+    }
+    /**
+     * Set period
+     *
+     * @param \AppBundle\Entity\Billing\BillPeriod $period
+     *
+     * @return BillAccounting
+     */
+    public function setBillPeriod(\AppBundle\Entity\Billing\BillPeriod $billPeriod = null)
+    {
+        $this->billPeriod = $billPeriod;
+
+        return $this;
+    }
+    /**
+     * Get period
+     *
+     * @return \AppBundle\Entity\Billing\BillPeriod
+     */
+    public function getBillPeriod()
+    {
+        return $this->billPeriod;
+    }
+    /**
+     * Set totalDetail
+     *
+     * @param \AppBundle\Entity\Billing\BillTotalDetail $totalDetail
+     *
+     * @return BillAccounting
+     */
+    public function setTotalDetail(\AppBundle\Entity\Billing\BillTotalDetail $totalDetail = null)
+    {
+        $this->totalDetail = $totalDetail;
+
+        return $this;
+    }
+    /**
+     * Get totalDetail
+     *
+     * @return \AppBundle\Entity\Billing\BillTotalDetail
+     */
+    public function getTotalDetail()
+    {
+        return $this->totalDetail;
+    }
+    /**
+     * Set accessDetail
+     *
+     * @param \AppBundle\Entity\Billing\BillAccessDetail $accessDetail
+     *
+     * @return BillAccounting
+     */
+    public function setAccessDetail(\AppBundle\Entity\Billing\BillAccessDetail $accessDetail = null)
+    {
+        $this->accessDetail = $accessDetail;
+
+        return $this;
+    }
+    /**
+     * Get accessDetail
+     *
+     * @return \AppBundle\Entity\Billing\BillAccessDetail
+     */
+    public function getAccessDetail()
+    {
+        return $this->accessDetail;
+    }
+    /**
+     * get listStudents
+     *
+     * @return array
+     */
+    public function getListStudents()
+    {
+        $students = [];
+        foreach($this->getBillLines() as $billLine){
+            if(!empty($billLine->getAccess()))
+                $students[] = $billLine->getAccess()->getPerson()->getFullNameTemplate();
+        }
+
+        return array_values(array_unique($students));
+    }
+    /**
+     * Set billNumberInteger
+     *
+     * @param integer $billNumberInteger
+     *
+     * @return BillAccounting
+     */
+    public function setBillNumberInteger($billNumberInteger)
+    {
+        $this->billNumberInteger = $billNumberInteger;
+
+        return $this;
+    }
+    /**
+     * Get billNumberInteger
+     *
+     * @return integer
+     */
+    public function getBillNumberInteger()
+    {
+        return $this->billNumberInteger;
+    }
+    /**
+     * Set billCreditInteger
+     *
+     * @param integer $billCreditInteger
+     *
+     * @return BillAccounting
+     */
+    public function setBillCreditInteger($billCreditInteger)
+    {
+        $this->billCreditInteger = $billCreditInteger;
+
+        return $this;
+    }
+    /**
+     * Get billCreditInteger
+     *
+     * @return integer
+     */
+    public function getBillCreditInteger()
+    {
+        return $this->billCreditInteger;
+    }
+    /**
+     * Set sepaSampling
+     *
+     * @param boolean $sepaSampling
+     *
+     * @return BillAccounting
+     */
+    public function setSepaSampling($sepaSampling)
+    {
+        $this->sepaSampling = $sepaSampling;
+
+        return $this;
+    }
+    /**
+     * Get sepaSampling
+     *
+     * @return boolean
+     */
+    public function getSepaSampling()
+    {
+        return $this->sepaSampling;
+    }
+    /**
+     * Set bergerLevrault
+     *
+     * @param \AppBundle\Entity\Billing\BergerLevrault $bergerLevrault
+     *
+     * @return BillAccounting
+     */
+    public function setBergerLevrault(\AppBundle\Entity\Billing\BergerLevrault $bergerLevrault = null)
+    {
+        $this->bergerLevrault = $bergerLevrault;
+
+        return $this;
+    }
+    /**
+     * Get bergerLevrault
+     *
+     * @return \AppBundle\Entity\Billing\BergerLevrault
+     */
+    public function getBergerLevrault()
+    {
+        return $this->bergerLevrault;
+    }
+    /**
+     * Set samplingDate
+     *
+     * @param \DateTime $samplingDate
+     *
+     * @return BillAccounting
+     */
+    public function setSamplingDate($samplingDate)
+    {
+        $this->samplingDate = $samplingDate;
+
+        return $this;
+    }
+    /**
+     * Get samplingDate
+     *
+     * @return \DateTime
+     */
+    public function getSamplingDate()
+    {
+        return $this->samplingDate;
+    }
+    /**
+     * Set availabilityDate
+     *
+     * @param \DateTime $availabilityDate
+     *
+     * @return BillAccounting
+     */
+    public function setAvailabilityDate($availabilityDate)
+    {
+        $this->availabilityDate = $availabilityDate;
+
+        return $this;
+    }
+    /**
+     * Get availabilityDate
+     *
+     * @return \DateTime
+     */
+    public function getAvailabilityDate()
+    {
+        return $this->availabilityDate;
+    }
+    /**
+     * Set limitPaymentDate
+     *
+     * @param \DateTime $limitPaymentDate
+     *
+     * @return BillAccounting
+     */
+    public function setLimitPaymentDate($limitPaymentDate)
+    {
+        $this->limitPaymentDate = $limitPaymentDate;
+
+        return $this;
+    }
+    /**
+     * Get limitPaymentDate
+     *
+     * @return \DateTime
+     */
+    public function getLimitPaymentDate()
+    {
+        return $this->limitPaymentDate;
+    }
+    /**
+     * Set payfipPaymentToken
+     *
+     * @param string $payfipPaymentToken
+     *
+     * @return BillAccounting
+     */
+    public function setPayfipPaymentToken($payfipPaymentToken)
+    {
+        $this->payfipPaymentToken = $payfipPaymentToken;
+
+        return $this;
+    }
+    /**
+     * Get payfipPaymentToken
+     *
+     * @return string
+     */
+    public function getPayfipPaymentToken()
+    {
+        return $this->payfipPaymentToken;
+    }
+    /**
+     * Set jvs
+     *
+     * @param \AppBundle\Entity\Billing\Jvs $jvs
+     *
+     * @return BillAccounting
+     */
+    public function setJvs(\AppBundle\Entity\Billing\Jvs $jvs = null)
+    {
+        $this->jvs = $jvs;
+
+        return $this;
+    }
+    /**
+     * Get jvs
+     *
+     * @return \AppBundle\Entity\Billing\Jvs
+     */
+    public function getJvs()
+    {
+        return $this->jvs;
+    }
+    /**
+     * Set enforceableTitle
+     *
+     * @param string $enforceableTitle
+     *
+     * @return BillAccounting
+     */
+    public function setEnforceableTitle($enforceableTitle)
+    {
+        $this->enforceableTitle = $enforceableTitle;
+
+        return $this;
+    }
+    /**
+     * Get enforceableTitle
+     *
+     * @return string
+     */
+    public function getEnforceableTitle()
+    {
+        return $this->enforceableTitle;
+    }
+    public function setStartSchoolYear($startSchoolYear)
+    {
+        $this->startSchoolYear = $startSchoolYear;
+
+        return $this;
+    }
+    /**
+     * Get startSchoolYear
+     *
+     * @return integer
+     */
+    public function getStartSchoolYear()
+    {
+        return $this->startSchoolYear;
+    }
+    /**
+     * Set label
+     *
+     * @param string $label
+     *
+     * @return BillAccounting
+     */
+    public function setLabel($label = null)
+    {
+        $this->label = $label;
+
+        return $this;
+    }
+    /**
+     * Get label
+     *
+     * @return string
+     */
+    public function getLabel()
+    {
+        return $this->label;
+    }
+    /**
+     * Gets paymentState.
+     *
+     * @return bool
+     */
+    public function getIsApplied()
+    {
+        return !empty($this->getBill());
+
+    }
+    /**
+     * Add tag
+     *
+     * @param \AppBundle\Entity\Core\Tagg $tag
+     *
+     * @return BillAccounting
+     */
+    public function addTag(\AppBundle\Entity\Core\Tagg $tag)
+    {
+        $this->tags[] = $tag;
+
+        return $this;
+    }
+    /**
+     * Remove tag
+     *
+     * @param \AppBundle\Entity\Core\Tagg $tag
+     */
+    public function removeTag(\AppBundle\Entity\Core\Tagg $tag)
+    {
+        $this->tags->removeElement($tag);
+    }
+    /**
+     * Get tags
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getTags()
+    {
+        return $this->tags;
+    }
+    /**
+     * Gets students tags.
+     *
+     * @return array
+     */
+    public function getStudentsTagsTemplate()
+    {
+        $tags = [];
+
+        foreach ($this->getBillLines() as $billLine){
+            $access = $billLine->getAccess();
+            if(!empty($access)){
+                foreach ($access->getTags() as $billLineAcesstags){
+                    $tags[] = $billLineAcesstags->getLabel();
+                }
+            }
+        }
+
+        if(!empty($this->getBill())){
+            foreach ($this->getBill()->getBillLines() as $billLine){
+                $access = $billLine->getAccess();
+                if(!empty($access)){
+                    foreach ($access->getTags() as $billLineAcesstags){
+                        $tags[] = $billLineAcesstags->getLabel();
+                    }
+                }
+            }
+        }
+
+
+
+        return array_unique($tags);
+    }
+    /**
+     * Set ciril
+     *
+     * @param \AppBundle\Entity\Billing\Ciril $ciril
+     *
+     * @return BillAccounting
+     */
+    public function setCiril(\AppBundle\Entity\Billing\Ciril $ciril = null)
+    {
+        $this->ciril = $ciril;
+
+        return $this;
+    }
+    /**
+     * Get ciril
+     *
+     * @return \AppBundle\Entity\Billing\Ciril
+     */
+    public function getCiril()
+    {
+        return $this->ciril;
+    }
+    /**
+     * Set payfipUrlDateTime
+     *
+     * @param \DateTime $payfipUrlDateTime
+     *
+     * @return BillAccounting
+     */
+    public function setPayfipUrlDateTime($payfipUrlDateTime)
+    {
+        $this->payfipUrlDateTime = $payfipUrlDateTime;
+
+        return $this;
+    }
+    /**
+     * Get payfipUrlDateTime
+     *
+     * @return \DateTime
+     */
+    public function getPayfipUrlDateTime()
+    {
+        return $this->payfipUrlDateTime;
+    }
+}

+ 10 - 0
old/Entity/Billing/BillAccountingInterface.php

@@ -0,0 +1,10 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+/**
+ *
+ */
+interface BillAccountingInterface {
+
+}

+ 23 - 0
old/Entity/Billing/BillCredit.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use AppBundle\Entity\Core\File;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use AppBundle\Annotation\DefaultField;
+
+/**
+ * Avoir
+ *
+ * @Iri("http://schema.org/BillCredit")
+ */
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\Billing\Repository\BillCreditRepository')]
+class BillCredit extends BillAccounting implements BillAccountingInterface
+{
+}

+ 180 - 0
old/Entity/Billing/BillDebitBalance.php

@@ -0,0 +1,180 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Trop-perçu conservé pour être reversé à la Bill suivante
+ *
+ * @Iri("http://schema.org/BillDebitBalance")
+ */
+#[ORM\Entity]
+class BillDebitBalance
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['billdebitbalance'])]
+    private $id;
+    /**
+     * @var BillingSetting
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\AccessBilling', inversedBy: 'billDebitBalances')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['billdebitbalance'])]
+    private $accessBilling;
+    /**
+     *
+     * @var BillPayment
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\BillPayment', inversedBy: 'billDebitBalances', cascade: ['persist'])]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['billdebitbalance'])]
+    private $billPayment;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['billdebitbalance'])]
+    private $amount;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['billdebitbalance'])]
+    private $isUsed = false;
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+        $this->accessBilling = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set amount
+     *
+     * @param float $amount
+     *
+     * @return BillDebitBalance
+     */
+    public function setAmount($amount)
+    {
+        $this->amount = $amount;
+
+        return $this;
+    }
+    /**
+     * Get amount
+     *
+     * @return float
+     */
+    public function getAmount()
+    {
+        return $this->amount;
+    }
+    /**
+     * Set accessBilling
+     *
+     * @param \AppBundle\Entity\Billing\AccessBilling $accessBilling
+     *
+     * @return BillDebitBalance
+     */
+    public function setAccessBilling(\AppBundle\Entity\Billing\AccessBilling $accessBilling)
+    {
+        $this->accessBilling = $accessBilling;
+
+        return $this;
+    }
+    /**
+     * Get accessBilling
+     *
+     * @return \AppBundle\Entity\Billing\AccessBilling
+     */
+    public function getAccessBilling()
+    {
+        return $this->accessBilling;
+    }
+    /**
+     * Set billPayment
+     *
+     * @param \AppBundle\Entity\Billing\BillPayment $billPayment
+     *
+     * @return BillDebitBalance
+     */
+    public function setBillPayment(\AppBundle\Entity\Billing\BillPayment $billPayment)
+    {
+        $this->billPayment = $billPayment;
+
+        return $this;
+    }
+    /**
+     * Get billPayment
+     *
+     * @return \AppBundle\Entity\Billing\BillPayment
+     */
+    public function getBillPayment()
+    {
+        return $this->billPayment;
+    }
+    /**
+     * Set isUsed
+     *
+     * @param boolean $isUsed
+     *
+     * @return BillDebitBalance
+     */
+    public function setIsUsed($isUsed)
+    {
+        $this->isUsed = $isUsed;
+
+        return $this;
+    }
+    /**
+     * Get isUsed
+     *
+     * @return boolean
+     */
+    public function getIsUsed()
+    {
+        return $this->isUsed;
+    }
+}

+ 555 - 0
old/Entity/Billing/BillLine.php

@@ -0,0 +1,555 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Booking\EducationalProject;
+use AppBundle\Entity\Product\EquipmentLoan;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+
+/**
+ * Une ligne de facturation
+ * @see BillAccounting
+ *
+ * @Iri("http://schema.org/BillLine")
+ */
+#[ORM\Entity]
+class BillLine
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['billline', 'billaccounting_list', 'bill_list', 'build_bills'])]
+    private $id;
+    /**
+     * @var Bill
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\BillAccounting', inversedBy: 'billLines')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['billline'])]
+    private $bill;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'billLines')]
+    #[Groups(['billline', 'billaccounting_list_billlines', 'bill_list_billlines', 'billpayment_list_bill', 'billaccounting_list_bill', 'billcredit_list_bill', 'build_bills_billlines'])]
+    private $access;
+    /**
+     * @var EducationalProject
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Booking\EducationalProject', inversedBy: 'billLines')]
+    #[Groups(['billline', 'build_bills_billlines'])]
+    private $educationalProject;
+    /**
+     * @var EquipmentLoan
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Product\EquipmentLoan', inversedBy: 'billLines')]
+    #[Groups(['billline'])]
+    private $equipmentLoan;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billline', 'build_bills_billlines'])]
+    private $intangibleName;
+    /**
+     * @var string
+     *
+     * @Iri("https://schema.org/description")
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billline', 'build_bills_billlines'])]
+    private $intangibleDescription;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billline'])]
+    private $intangibleDomain;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['billline', 'build_bills_billlines'])]
+    private $quantity;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['billline', 'build_bills_billlines'])]
+    private $unitPrice;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['billline', 'build_bills_billlines'])]
+    private $vat;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['billline', 'build_bills_billlines'])]
+    private $totalPrice;
+    /**
+     * @var array
+     */
+    #[ORM\Column(type: 'json_array', nullable: true)]
+    #[Groups(['billline', 'build_bills_billlines'])]
+    private $reductions;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['billline', 'build_bills_billlines'])]
+    private $accountingCode;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 200, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billline', 'build_bills_billlines'])]
+    private $accountingCodelabel;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['billline', 'build_bills_billlines'])]
+    private $nature;
+    /**
+     * @var array
+     */
+    #[ORM\Column(type: 'json_array', nullable: true)]
+    #[Groups(['billline'])]
+    private $educations;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => true])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['billline', 'build_bills_billlines'])]
+    private $showInBill = true;
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set intangibleName
+     *
+     * @param string $intangibleName
+     *
+     * @return BillLine
+     */
+    public function setIntangibleName($intangibleName)
+    {
+        $this->intangibleName = $intangibleName;
+
+        return $this;
+    }
+    /**
+     * Get intangibleName
+     *
+     * @return string
+     */
+    public function getIntangibleName()
+    {
+        return $this->intangibleName;
+    }
+    /**
+     * Set intangibleDescription
+     *
+     * @param string $intangibleDescription
+     *
+     * @return BillLine
+     */
+    public function setIntangibleDescription($intangibleDescription)
+    {
+        $this->intangibleDescription = $intangibleDescription;
+
+        return $this;
+    }
+    /**
+     * Get intangibleDescription
+     *
+     * @return string
+     */
+    public function getIntangibleDescription()
+    {
+        return $this->intangibleDescription;
+    }
+    /**
+     * Set quantity
+     *
+     * @param integer $quantity
+     *
+     * @return BillLine
+     */
+    public function setQuantity($quantity)
+    {
+        $this->quantity = $quantity;
+
+        return $this;
+    }
+    /**
+     * Get quantity
+     *
+     * @return integer
+     */
+    public function getQuantity()
+    {
+        return $this->quantity;
+    }
+    /**
+     * Set unitPrice
+     *
+     * @param float $unitPrice
+     *
+     * @return BillLine
+     */
+    public function setUnitPrice($unitPrice)
+    {
+        $this->unitPrice = floatval($unitPrice);
+
+        return $this;
+    }
+    /**
+     * Get unitPrice
+     *
+     * @return float
+     */
+    public function getUnitPrice()
+    {
+        return $this->unitPrice;
+    }
+    /**
+     * Set bill
+     *
+     * @param $bill
+     *
+     * @return BillLine
+     */
+    public function setBill($bill)
+    {
+        $this->bill = $bill;
+
+        return $this;
+    }
+    /**
+     * Get bill
+     *
+     * @return
+     */
+    public function getBill()
+    {
+        return $this->bill;
+    }
+    /**
+     * Set access
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $access
+     *
+     * @return BillLine
+     */
+    public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access)
+    {
+        $this->access = $access;
+
+        return $this;
+    }
+    /**
+     * Get access
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getAccess()
+    {
+        return $this->access;
+    }
+    /**
+     * Set vat
+     *
+     * @param float $vat
+     *
+     * @return BillLine
+     */
+    public function setVat($vat)
+    {
+        $this->vat = floatval($vat);
+
+        return $this;
+    }
+    /**
+     * Get vat
+     *
+     * @return float
+     */
+    public function getVat()
+    {
+        return $this->vat;
+    }
+    /**
+     * Set totalPrice
+     *
+     * @param float $totalPrice
+     *
+     * @return BillLine
+     */
+    public function setTotalPrice($totalPrice)
+    {
+        $this->totalPrice = floatval($totalPrice);
+
+        return $this;
+    }
+    /**
+     * Get totalPrice
+     *
+     * @return float
+     */
+    public function getTotalPrice()
+    {
+        return $this->totalPrice;
+    }
+    /**
+     * Set reductions
+     *
+     * @param array $reductions
+     *
+     * @return BillLine
+     */
+    public function setReductions($reductions)
+    {
+        $this->reductions = $reductions;
+
+        return $this;
+    }
+    /**
+     * Get reductions
+     *
+     * @return array
+     */
+    public function getReductions()
+    {
+        return $this->reductions;
+    }
+    /**
+     * Set accountingCode
+     *
+     * @param integer $accountingCode
+     *
+     * @return BillLine
+     */
+    public function setAccountingCode($accountingCode)
+    {
+        $this->accountingCode = $accountingCode;
+
+        return $this;
+    }
+    /**
+     * Get accountingCode
+     *
+     * @return integer
+     */
+    public function getAccountingCode()
+    {
+        return $this->accountingCode;
+    }
+    /**
+     * Set nature
+     *
+     * @param integer $nature
+     *
+     * @return BillLine
+     */
+    public function setNature($nature)
+    {
+        $this->nature = $nature;
+
+        return $this;
+    }
+    /**
+     * Get nature
+     *
+     * @return integer
+     */
+    public function getNature()
+    {
+        return $this->nature;
+    }
+    /**
+     * Set educationalProject
+     *
+     * @param \AppBundle\Entity\Booking\EducationalProject $educationalProject
+     *
+     * @return BillLine
+     */
+    public function setEducationalProject(\AppBundle\Entity\Booking\EducationalProject $educationalProject = null)
+    {
+        $this->educationalProject = $educationalProject;
+
+        return $this;
+    }
+    /**
+     * Get educationalProject
+     *
+     * @return \AppBundle\Entity\Booking\EducationalProject
+     */
+    public function getEducationalProject()
+    {
+        return $this->educationalProject;
+    }
+    /**
+     * Set equipmentLoan
+     *
+     * @param \AppBundle\Entity\Product\EquipmentLoan $equipmentLoan
+     *
+     * @return BillLine
+     */
+    public function setEquipmentLoan(\AppBundle\Entity\Product\EquipmentLoan $equipmentLoan = null)
+    {
+        $this->equipmentLoan = $equipmentLoan;
+
+        return $this;
+    }
+    /**
+     * Get equipmentLoan
+     *
+     * @return \AppBundle\Entity\Product\EquipmentLoan
+     */
+    public function getEquipmentLoan()
+    {
+        return $this->equipmentLoan;
+    }
+    /**
+     * Set educations
+     *
+     * @param array $educations
+     *
+     * @return BillLine
+     */
+    public function setEducations($educations)
+    {
+        $this->educations = $educations;
+
+        return $this;
+    }
+    /**
+     * Get educations
+     *
+     * @return array
+     */
+    public function getEducations()
+    {
+        return $this->educations;
+    }
+    /**
+     * Set accountingCodelabel
+     *
+     * @param string $accountingCodelabel
+     *
+     * @return BillLine
+     */
+    public function setAccountingCodelabel($accountingCodelabel)
+    {
+        $this->accountingCodelabel = $accountingCodelabel;
+
+        return $this;
+    }
+    /**
+     * Get accountingCodelabel
+     *
+     * @return string
+     */
+    public function getAccountingCodelabel()
+    {
+        return $this->accountingCodelabel;
+    }
+    /**
+     * Set intangibleDomain
+     *
+     * @param string $intangibleDomain
+     *
+     * @return BillLine
+     */
+    public function setIntangibleDomain($intangibleDomain)
+    {
+        $this->intangibleDomain = $intangibleDomain;
+
+        return $this;
+    }
+    /**
+     * Get intangibleDomain
+     *
+     * @return string
+     */
+    public function getIntangibleDomain()
+    {
+        return $this->intangibleDomain;
+    }
+    /**
+     * Set showInBill
+     *
+     * @param boolean $showInBill
+     *
+     * @return BillLine
+     */
+    public function setShowInBill($showInBill)
+    {
+        $this->showInBill = $showInBill;
+
+        return $this;
+    }
+    /**
+     * Get showInBill
+     *
+     * @return boolean
+     */
+    public function getShowInBill()
+    {
+        return $this->showInBill;
+    }
+}

+ 523 - 0
old/Entity/Billing/BillPayment.php

@@ -0,0 +1,523 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Core\Tagg;
+use AppBundle\Enum\Billing\PaymentChoiceEnum;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+
+
+/**
+ * Données de paiement d'une facture BillAccounting
+ * NB: il peut y avoir plusieurs lignes pour une facture en cas de paiement en plusieurs fois
+ *
+ * @Iri("http://schema.org/BillPayment")
+ */
+#[ORM\Entity]
+class BillPayment
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['billpayment', 'billpayment_list', 'build_bills', 'billpayment_list', 'account_balance_reimbursements_accessbilling'])]
+    private $id;
+    /**
+     * @var BillAccounting
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\BillAccounting', inversedBy: 'billPayments', cascade: ['persist'])]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['billpayment', 'billpayment_list'])]
+    private $bill;
+    /**
+     * @var AccessBilling
+     */
+    #[ORM\ManyToOne(targetEntity: 'AccessBilling', inversedBy: 'billDetachedPayments', cascade: ['persist'])]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['billpayment'])]
+    private $accessBilling;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['billpayment', 'billpayment_list', 'build_bills_billpayments'])]
+    private $receiptDate;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['billpayment', 'billpayment_list', 'build_bills_billpayments', 'billpayment_list', 'account_balance_reimbursements_accessbilling'])]
+    private $effectiveReceiptDate;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\PaymentChoiceEnum', 'toArray'])]
+    #[Groups(['billpayment', 'billpayment_list', 'build_bills_billpayments', 'billpayment_list', 'account_balance_reimbursements_accessbilling'])]
+    private $paymentChoice;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\BankEnum', 'toArray'])]
+    #[Groups(['billpayment', 'billpayment_list', 'account_balance_reimbursements_accessbilling'])]
+    private $bank;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billpayment', 'billpayment_list', 'account_balance_reimbursements_accessbilling'])]
+    private $agency;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billpayment', 'billpayment_list', 'account_balance_reimbursements_accessbilling'])]
+    private $checkNumber;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billpayment', 'billpayment_list', 'account_balance_reimbursements_accessbilling'])]
+    private $reference;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['billpayment', 'billpayment_list', 'account_balance_reimbursements_accessbilling', 'billpayment_list', 'build_bills_billpayments'])]
+    private $amount;
+    /**
+     * @var BillDebitBalance
+     */
+    #[ORM\OneToMany(targetEntity: 'BillDebitBalance', mappedBy: 'billPayment', cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['billpayment_billdebitbalance'])]
+    private $billDebitBalances;
+    /**
+     * @var AccessBilling
+     */
+    #[ORM\ManyToOne(targetEntity: 'AccessBilling', inversedBy: 'accountBalanceReimbursements', cascade: ['persist'])]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['billpayment', 'billpayment_list'])]
+    private $accessBillingAccountBalanceReimbursement;
+    /**
+     * @var boolean
+     */
+    #[Groups(['billpayment', 'billpayment_list'])]
+    private $isAcquired;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', options: ['default' => 'PAYMENT'])]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\PaymentTypeEnum', 'toArray'])]
+    #[Groups(['billpayment', 'billpayment_list', 'account_balance_reimbursements_accessbilling', 'build_bills_billpayments'])]
+    private $type= 'PAYMENT';
+    /**
+     * @var ArrayCollection<Tagg>
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\Tagg', cascade: ['persist'], inversedBy: 'payments')]
+    #[Assert\Valid]
+    #[ORM\JoinTable(name: 'tag_billPayment', joinColumns: [], inverseJoinColumns: [])]
+    #[ORM\JoinColumn(name: 'billPayment_id', referencedColumnName: 'id')]
+    #[ORM\JoinColumn(name: 'tag_id', referencedColumnName: 'id')]
+    #[Groups(['billpayment_tags', 'manage_tags', 'billpayment_list'])]
+    private $tags;
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+        $this->billDebitBalances = new ArrayCollection();
+        $this->tags = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set receiptDate
+     *
+     * @param \DateTime $receiptDate
+     *
+     * @return BillPayment
+     */
+    public function setReceiptDate($receiptDate)
+    {
+        $this->receiptDate = $receiptDate;
+
+        return $this;
+    }
+    /**
+     * Get receiptDate
+     *
+     * @return \DateTime
+     */
+    public function getReceiptDate()
+    {
+        return $this->receiptDate ? $this->receiptDate->format('Y-m-d') : $this->receiptDate;
+    }
+    /**
+     * Set effectiveReceiptDate
+     *
+     * @param \DateTime $effectiveReceiptDate
+     *
+     * @return BillPayment
+     */
+    public function setEffectiveReceiptDate($effectiveReceiptDate)
+    {
+        $this->effectiveReceiptDate = $effectiveReceiptDate;
+
+        return $this;
+    }
+    /**
+     * Get effectiveReceiptDate
+     *
+     * @return \DateTime
+     */
+    public function getEffectiveReceiptDate()
+    {
+        return $this->effectiveReceiptDate ? $this->effectiveReceiptDate->format('Y-m-d') : $this->effectiveReceiptDate;
+    }
+    /**
+     * Set paymentChoice
+     *
+     * @param string $paymentChoice
+     *
+     * @return BillPayment
+     */
+    public function setPaymentChoice($paymentChoice)
+    {
+        $this->paymentChoice = $paymentChoice;
+
+        return $this;
+    }
+    /**
+     * Get paymentChoice
+     *
+     * @return string
+     */
+    public function getPaymentChoice()
+    {
+        return $this->paymentChoice;
+    }
+    /**
+     * Set bank
+     *
+     * @param string $bank
+     *
+     * @return BillPayment
+     */
+    public function setBank($bank)
+    {
+        $this->bank = $bank;
+
+        return $this;
+    }
+    /**
+     * Get bank
+     *
+     * @return string
+     */
+    public function getBank()
+    {
+        return $this->bank;
+    }
+    /**
+     * Set agency
+     *
+     * @param string $agency
+     *
+     * @return BillPayment
+     */
+    public function setAgency($agency)
+    {
+        $this->agency = $agency;
+
+        return $this;
+    }
+    /**
+     * Get agency
+     *
+     * @return string
+     */
+    public function getAgency()
+    {
+        return $this->agency;
+    }
+    /**
+     * Set checkNumber
+     *
+     * @param string $checkNumber
+     *
+     * @return BillPayment
+     */
+    public function setCheckNumber($checkNumber)
+    {
+        $this->checkNumber = $checkNumber;
+
+        return $this;
+    }
+    /**
+     * Get checkNumber
+     *
+     * @return string
+     */
+    public function getCheckNumber()
+    {
+        return $this->checkNumber;
+    }
+    /**
+     * Set reference
+     *
+     * @param string $reference
+     *
+     * @return BillPayment
+     */
+    public function setReference($reference)
+    {
+        $this->reference = $reference;
+
+        return $this;
+    }
+    /**
+     * Get reference
+     *
+     * @return string
+     */
+    public function getReference()
+    {
+        return $this->reference;
+    }
+    /**
+     * Set amount
+     *
+     * @param float $amount
+     *
+     * @return BillPayment
+     */
+    public function setAmount($amount)
+    {
+        $this->amount = floatval($amount);
+
+        return $this;
+    }
+    /**
+     * Get amount
+     *
+     * @return float
+     */
+    public function getAmount()
+    {
+        return $this->amount;
+    }
+    /**
+     * Set bill
+     *
+     * @param \AppBundle\Entity\Billing\BillAccounting $bill
+     *
+     * @return BillPayment
+     */
+    public function setBill($bill = null)
+    {
+        $this->bill = $bill;
+
+        return $this;
+    }
+    /**
+     * Get bill
+     *
+     * @return \AppBundle\Entity\Billing\BillAccounting
+     */
+    public function getBill()
+    {
+        return $this->bill;
+    }
+    /**
+     * Gets isAcquired.
+     *
+     * @return boolean
+     */
+    public function getIsAcquired()
+    {
+        $isAcquired = false;
+        if($this->getAmount() && !is_null($this->getEffectiveReceiptDate())){
+            $isAcquired = true;
+        }
+        return $isAcquired;
+    }
+    /**
+     * Set accessBilling
+     *
+     * @param \AppBundle\Entity\Billing\AccessBilling $accessBilling
+     *
+     * @return BillPayment
+     */
+    public function setAccessBilling(\AppBundle\Entity\Billing\AccessBilling $accessBilling = null)
+    {
+        $this->accessBilling = $accessBilling;
+
+        return $this;
+    }
+    /**
+     * Get accessBilling
+     *
+     * @return \AppBundle\Entity\Billing\AccessBilling
+     */
+    public function getAccessBilling()
+    {
+        return $this->accessBilling;
+    }
+    /**
+     * Add billDebitBalance
+     *
+     * @param \AppBundle\Entity\Billing\BillDebitBalance $billDebitBalance
+     *
+     * @return BillPayment
+     */
+    public function addBillDebitBalance(\AppBundle\Entity\Billing\BillDebitBalance $billDebitBalance)
+    {
+        $billDebitBalance->setBillPayment($this);
+        $this->billDebitBalances[] = $billDebitBalance;
+
+        return $this;
+    }
+    /**
+     * Remove billDebitBalance
+     *
+     * @param \AppBundle\Entity\Billing\BillDebitBalance $billDebitBalance
+     */
+    public function removeBillDebitBalance(\AppBundle\Entity\Billing\BillDebitBalance $billDebitBalance)
+    {
+        $this->billDebitBalances->removeElement($billDebitBalance);
+    }
+    /**
+     * Get billDebitBalances
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBillDebitBalances()
+    {
+        return $this->billDebitBalances;
+    }
+    /**
+     * Set type
+     *
+     * @param string $type
+     *
+     * @return BillPayment
+     */
+    public function setType($type)
+    {
+        $this->type = $type;
+
+        return $this;
+    }
+    /**
+     * Get type
+     *
+     * @return string
+     */
+    public function getType()
+    {
+        return $this->type;
+    }
+    /**
+     * Add tag
+     *
+     * @param \AppBundle\Entity\Core\Tagg $tag
+     *
+     * @return BillPayment
+     */
+    public function addTag(\AppBundle\Entity\Core\Tagg $tag)
+    {
+        $this->tags[] = $tag;
+
+        return $this;
+    }
+    /**
+     * Remove tag
+     *
+     * @param \AppBundle\Entity\Core\Tagg $tag
+     */
+    public function removeTag(\AppBundle\Entity\Core\Tagg $tag)
+    {
+        $this->tags->removeElement($tag);
+    }
+    /**
+     * Get tags
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getTags()
+    {
+        return $this->tags;
+    }
+    /**
+     * Set accessBillingAccountBalanceReimbursement
+     *
+     * @param \AppBundle\Entity\Billing\AccessBilling $accessBillingAccountBalanceReimbursement
+     *
+     * @return BillPayment
+     */
+    public function setAccessBillingAccountBalanceReimbursement(\AppBundle\Entity\Billing\AccessBilling $accessBillingAccountBalanceReimbursement = null)
+    {
+        $this->accessBillingAccountBalanceReimbursement = $accessBillingAccountBalanceReimbursement;
+
+        return $this;
+    }
+    /**
+     * Get accessBillingAccountBalanceReimbursement
+     *
+     * @return \AppBundle\Entity\Billing\AccessBilling
+     */
+    public function getAccessBillingAccountBalanceReimbursement()
+    {
+        return $this->accessBillingAccountBalanceReimbursement;
+    }
+}

+ 242 - 0
old/Entity/Billing/BillPeriod.php

@@ -0,0 +1,242 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Période associée à une facture
+ * (Ex: Deuxième trimestre 2020)
+ *
+ * @Iri("http://schema.org/BillPeriod")
+ */
+#[ORM\Entity]
+class BillPeriod
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['billperiod', 'billaccounting_list', 'bill_list', 'billcredit_list', 'advancepayment_list', 'build_bills', 'billcredit_list', 'advancepayment_list'])]
+    private $id;
+    /**
+     * @var
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\PeriodicityEnum', 'toArray'])]
+    #[Groups(['billperiod', 'billaccounting_list_billperiod', 'bill_list_billperiod', 'billcredit_list_billperiod', 'build_bills_billperiod'])]
+    private $periodicity;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billperiod', 'billaccounting_list_billperiod', 'bill_list_billperiod', 'billpayment_list_bill', 'billcredit_list_billperiod', 'advancepayment_list_billperiod', 'build_bills_billperiod', 'billcredit_list_billperiod', 'advancepayment_list_billperiod'])]
+    private $schoolYear;
+    /**
+     * @var \DateTime
+     *
+     * @Iri("https://schema.org/detailDateStart")
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['billperiod', 'build_bills_billperiod'])]
+    private $detailDateStart;
+    /**
+     * @var \DateTime
+     *
+     * @Iri("https://schema.org/detailDateEnd")
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['billperiod'])]
+    private $detailDateEnd;
+    /**
+     * @var
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\PeriodEnum', 'toArray'])]
+    #[Groups(['billperiod', 'billaccounting_list_billperiod', 'bill_list_billperiod', 'billpayment_list_bill', 'billcredit_list_billperiod', 'build_bills_billperiod'])]
+    private $detailLabel;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['billperiod', 'build_bills_billperiod'])]
+    private $uniqDate;
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set periodicity
+     *
+     * @param string $periodicity
+     *
+     * @return BillPeriod
+     */
+    public function setPeriodicity($periodicity)
+    {
+        $this->periodicity = $periodicity;
+
+        return $this;
+    }
+    /**
+     * Get periodicity
+     *
+     * @return string
+     */
+    public function getPeriodicity()
+    {
+        return $this->periodicity;
+    }
+    /**
+     * Set schoolYear
+     *
+     * @param string $schoolYear
+     *
+     * @return BillPeriod
+     */
+    public function setSchoolYear($schoolYear)
+    {
+        $this->schoolYear = $schoolYear;
+
+        return $this;
+    }
+    /**
+     * Get schoolYear
+     *
+     * @return string
+     */
+    public function getSchoolYear()
+    {
+        return $this->schoolYear;
+    }
+    /**
+     * Set detailDateStart
+     *
+     * @param \DateTime $detailDateStart
+     *
+     * @return BillPeriod
+     */
+    public function setDetailDateStart($detailDateStart)
+    {
+        $this->detailDateStart = $detailDateStart;
+
+        return $this;
+    }
+    /**
+     * Get detailDateStart
+     *
+     * @return \DateTime
+     */
+    public function getDetailDateStart()
+    {
+        return $this->detailDateStart ? $this->detailDateStart->format('Y-m-d') : $this->detailDateStart;
+    }
+    /**
+     * Set detailDateEnd
+     *
+     * @param \DateTime $detailDateEnd
+     *
+     * @return BillPeriod
+     */
+    public function setDetailDateEnd($detailDateEnd)
+    {
+        $this->detailDateEnd = $detailDateEnd;
+
+        return $this;
+    }
+    /**
+     * Get detailDateEnd
+     *
+     * @return \DateTime
+     */
+    public function getDetailDateEnd()
+    {
+        return $this->detailDateEnd ? $this->detailDateEnd->format('Y-m-d') : $this->detailDateEnd;
+    }
+    /**
+     * Set uniqDate
+     *
+     * @param \DateTime $uniqDate
+     *
+     * @return BillPeriod
+     */
+    public function setUniqDate($uniqDate)
+    {
+        $this->uniqDate = $uniqDate;
+
+        return $this;
+    }
+    /**
+     * Get uniqDate
+     *
+     * @return \DateTime
+     */
+    public function getUniqDate()
+    {
+        return $this->uniqDate ? $this->uniqDate->format('Y-m-d') : $this->uniqDate;
+    }
+    /**
+     * Set detailLabel
+     *
+     * @param string $detailLabel
+     *
+     * @return BillPeriod
+     */
+    public function setDetailLabel($detailLabel)
+    {
+        $this->detailLabel = $detailLabel;
+
+        return $this;
+    }
+    /**
+     * Get detailLabel
+     *
+     * @return string
+     */
+    public function getDetailLabel()
+    {
+        return $this->detailLabel;
+    }
+}

+ 203 - 0
old/Entity/Billing/BillTotalDetail.php

@@ -0,0 +1,203 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Totaux des lignes BillLine d'une facture BillAccounting, avec calcul de TVA
+ *
+ * @Iri("http://schema.org/BillTotalDetail")
+ */
+#[ORM\Entity]
+class BillTotalDetail
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['billtotaldetail', 'billaccounting_list', 'bill_list', 'billcredit_list', 'build_bills'])]
+    private $id;
+    /**
+     * @var array
+     */
+    #[ORM\Column(type: 'json_array', nullable: true)]
+    #[Groups(['billtotaldetail', 'build_bills_totaldetail'])]
+    private $vat;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['billtotaldetail', 'build_bills_totaldetail'])]
+    private $htNoReduc;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['billtotaldetail', 'build_bills_totaldetail'])]
+    private $ht;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['billtotaldetail', 'billaccounting_list_totaldetail', 'bill_list_totaldetail', 'my_bills_show_bills', 'billcredit_list_totaldetail', 'build_bills_totaldetail'])]
+    private $ttc;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['billtotaldetail', 'build_bills_totaldetail'])]
+    private $totalReduction;
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set htNoReduc
+     *
+     * @param float $htNoReduc
+     *
+     * @return BillTotalDetail
+     */
+    public function setHtNoReduc($htNoReduc)
+    {
+        $this->htNoReduc = $htNoReduc;
+
+        return $this;
+    }
+    /**
+     * Get htNoReduc
+     *
+     * @return float
+     */
+    public function getHtNoReduc()
+    {
+        return $this->htNoReduc;
+    }
+    /**
+     * Set ht
+     *
+     * @param float $ht
+     *
+     * @return BillTotalDetail
+     */
+    public function setHt($ht)
+    {
+        $this->ht = $ht;
+
+        return $this;
+    }
+    /**
+     * Get ht
+     *
+     * @return float
+     */
+    public function getHt()
+    {
+        return $this->ht;
+    }
+    /**
+     * Set ttc
+     *
+     * @param float $ttc
+     *
+     * @return BillTotalDetail
+     */
+    public function setTtc($ttc)
+    {
+        $this->ttc = $ttc;
+
+        return $this;
+    }
+    /**
+     * Get ttc
+     *
+     * @return float
+     */
+    public function getTtc()
+    {
+        return $this->ttc;
+    }
+    /**
+     * Set totalReduction
+     *
+     * @param float $totalReduction
+     *
+     * @return BillTotalDetail
+     */
+    public function setTotalReduction($totalReduction)
+    {
+        $this->totalReduction = $totalReduction;
+
+        return $this;
+    }
+    /**
+     * Get totalReduction
+     *
+     * @return float
+     */
+    public function getTotalReduction()
+    {
+        return $this->totalReduction;
+    }
+    /**
+     * Set vat
+     *
+     * @param array $vat
+     *
+     * @return BillTotalDetail
+     */
+    public function setVat($vat)
+    {
+        $this->vat = $vat;
+
+        return $this;
+    }
+    /**
+     * Get vat
+     *
+     * @return array
+     */
+    public function getVat()
+    {
+        return $this->vat;
+    }
+}

+ 1095 - 0
old/Entity/Billing/BillingExportSetting.php

@@ -0,0 +1,1095 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Organization\Organization;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use AppBundle\Annotation\DefaultField;
+
+/**
+ * Paramètres généraux des exports de Bill
+ *
+ * @Iri("http://schema.org/BillingExportSetting")
+ */
+#[ORM\Entity]
+class BillingExportSetting
+{
+    //todo: INSERT INTO BillingExportSetting
+    //(`id`, `organization_id`, `idPost`, `idCollTipi`, `codColl`, `codBud`, `codProd`, `libelleColBud`,
+    //`gestionnaire`, `nameComptable`, `updateDate`, `updatedBy`)
+    //SELECT `id`, `organization_id`, `idPost`, `idCollTipi`, `codColl`, `codBud`, `codProd`, `libelleColBud`,
+    //`gestionnaire` , `nameComptable`, `updateDate`, `updatedBy`
+    //FROM PesSetting
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['billingexportsetting'])]
+    private $id;
+    /**
+     * @var Organization
+     *
+     * @DefaultField
+     */
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Organization\Organization', inversedBy: 'billingExportSetting', fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['billingexportsetting'])]
+    private $organization;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 14, nullable: true)]
+    #[Assert\Length(max: 14, maxMessage: 'invalid-max-length')]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $idPost;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $idColl;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $idCollTipi;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $codColl;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $codBud;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $codProd;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $libelleColBud;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $gestionnaire;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $nameComptable;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $creditorIban;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $creditorBic;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $creditorIcs;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $creditorName;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $creditorLineOneAddress;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $creditorLineTwoAddress;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $creditorPublicInstitution;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $creditorType;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $court;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 10, nullable: true)]
+    #[Assert\Length(max: 10, maxMessage: 'invalid-max-length')]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $budgetaryArticleCode;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 10, nullable: true)]
+    #[Assert\Length(max: 10, maxMessage: 'invalid-max-length')]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $rentalBudgetaryArticleCode;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 15, nullable: true)]
+    #[Assert\Length(max: 15, maxMessage: 'invalid-max-length')]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $serviceCode;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 10, nullable: true)]
+    #[Assert\Length(max: 10, maxMessage: 'invalid-max-length')]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $codFunction;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 6, nullable: true)]
+    #[Assert\Length(max: 6, maxMessage: 'invalid-max-length')]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $payfipCustomerNumber;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', options: ['default' => 'TEST'])]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\PayfipStatusEnum', 'toArray'])]
+    #[Groups(['billingexportsetting'])]
+    private $payfipStatus = "TEST";
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 250, nullable: true)]
+    #[Assert\Length(max: 250, maxMessage: 'invalid-max-length')]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $bergerLevraultSamplingMethod;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 3, nullable: true)]
+    #[Assert\Length(max: 3, maxMessage: 'invalid-max-length')]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $establishmentCode;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access')]
+    #[Groups(['billingexportsetting'])]
+    private $stageManagers;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => true])]
+    #[Assert\Type(type: 'boolean')]
+    #[Groups(['billingexportsetting'])]
+    #[Assert\NotNull]
+    private $payfipSeveralPayments = true;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 4, nullable: true)]
+    #[Assert\Length(max: 4, maxMessage: 'invalid-max-length')]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $lotReference;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 2, nullable: true)]
+    #[Assert\Length(max: 2, maxMessage: 'invalid-max-length')]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $directDebitCode;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 10, nullable: true)]
+    #[Assert\Length(max: 10, maxMessage: 'invalid-max-length')]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $functionalCode;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 10, nullable: true)]
+    #[Assert\Length(max: 10, maxMessage: 'invalid-max-length')]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $antenna;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingexportsetting'])]
+    private $teneurName;
+    /**
+     * @var Bill
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\SddTeneur')]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['billingexportsetting'])]
+    private $teneur;
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+        $this->stageManagers = new ArrayCollection();
+    }
+    /**
+     * Get id
+     *
+     * @return integer
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set organization
+     *
+     * @param \AppBundle\Entity\Organization\Organization $organization
+     *
+     * @return BillingExportSetting
+     */
+    public function setOrganization(\AppBundle\Entity\Organization\Organization $organization)
+    {
+        $this->organization = $organization;
+
+        return $this;
+    }
+    /**
+     * Get organization
+     *
+     * @return \AppBundle\Entity\Organization\Organization
+     */
+    public function getOrganization()
+    {
+        return $this->organization;
+    }
+    /**
+     * Set idPost
+     *
+     * @param string $idPost
+     *
+     * @return BillingExportSetting
+     */
+    public function setIdPost($idPost)
+    {
+        $this->idPost = $idPost;
+
+        return $this;
+    }
+    /**
+     * Get idPost
+     *
+     * @return string
+     */
+    public function getIdPost()
+    {
+        return $this->idPost;
+    }
+    /**
+     * Set idColl
+     *
+     * @param string $idColl
+     *
+     * @return BillingExportSetting
+     */
+    public function setIdColl($idColl)
+    {
+        $this->idColl = $idColl;
+
+        return $this;
+    }
+    /**
+     * Get idColl
+     *
+     * @return string
+     */
+    public function getIdColl()
+    {
+        return $this->idColl;
+    }
+    /**
+     * Set idCollTipi
+     *
+     * @param string $idCollTipi
+     *
+     * @return BillingExportSetting
+     */
+    public function setIdCollTipi($idCollTipi)
+    {
+        $this->idCollTipi = $idCollTipi;
+
+        return $this;
+    }
+    /**
+     * Get idCollTipi
+     *
+     * @return string
+     */
+    public function getIdCollTipi()
+    {
+        return $this->idCollTipi;
+    }
+    /**
+     * Set codColl
+     *
+     * @param string $codColl
+     *
+     * @return BillingExportSetting
+     */
+    public function setCodColl($codColl)
+    {
+        $this->codColl = $codColl;
+
+        return $this;
+    }
+    /**
+     * Get codColl
+     *
+     * @return string
+     */
+    public function getCodColl()
+    {
+        return $this->codColl;
+    }
+    /**
+     * Set codBud
+     *
+     * @param string $codBud
+     *
+     * @return BillingExportSetting
+     */
+    public function setCodBud($codBud)
+    {
+        $this->codBud = $codBud;
+
+        return $this;
+    }
+    /**
+     * Get codBud
+     *
+     * @return string
+     */
+    public function getCodBud()
+    {
+        return $this->codBud;
+    }
+    /**
+     * Set codProd
+     *
+     * @param string $codProd
+     *
+     * @return BillingExportSetting
+     */
+    public function setCodProd($codProd)
+    {
+        $this->codProd = $codProd;
+
+        return $this;
+    }
+    /**
+     * Get codProd
+     *
+     * @return string
+     */
+    public function getCodProd()
+    {
+        return $this->codProd;
+    }
+    /**
+     * Get codProdPayFip
+     *
+     * @return string
+     */
+    public function getCodProdPayFip()
+    {
+        return mb_substr($this->codProd, 0, 2);
+    }
+    /**
+     * Set libelleColBud
+     *
+     * @param string $libelleColBud
+     *
+     * @return BillingExportSetting
+     */
+    public function setLibelleColBud($libelleColBud)
+    {
+        $this->libelleColBud = $libelleColBud;
+
+        return $this;
+    }
+    /**
+     * Get libelleColBud
+     *
+     * @return string
+     */
+    public function getLibelleColBud()
+    {
+        return $this->libelleColBud;
+    }
+    /**
+     * Set gestionnaire
+     *
+     * @param string $gestionnaire
+     *
+     * @return BillingExportSetting
+     */
+    public function setGestionnaire($gestionnaire)
+    {
+        $this->gestionnaire = $gestionnaire;
+
+        return $this;
+    }
+    /**
+     * Get gestionnaire
+     *
+     * @return string
+     */
+    public function getGestionnaire()
+    {
+        return $this->gestionnaire;
+    }
+    /**
+     * Set nameComptable
+     *
+     * @param string $nameComptable
+     *
+     * @return BillingExportSetting
+     */
+    public function setNameComptable($nameComptable)
+    {
+        $this->nameComptable = $nameComptable;
+
+        return $this;
+    }
+    /**
+     * Get nameComptable
+     *
+     * @return string
+     */
+    public function getNameComptable()
+    {
+        return $this->nameComptable;
+    }
+    /**
+     * Set creditorIban
+     *
+     * @param string $creditorIban
+     *
+     * @return BillingExportSetting
+     */
+    public function setCreditorIban($creditorIban)
+    {
+        $this->creditorIban = $creditorIban;
+
+        return $this;
+    }
+    /**
+     * Get creditorIban
+     *
+     * @return string
+     */
+    public function getCreditorIban()
+    {
+        return $this->creditorIban;
+    }
+    /**
+     * Set creditorBic
+     *
+     * @param string $creditorBic
+     *
+     * @return BillingExportSetting
+     */
+    public function setCreditorBic($creditorBic)
+    {
+        $this->creditorBic = $creditorBic;
+
+        return $this;
+    }
+    /**
+     * Get creditorBic
+     *
+     * @return string
+     */
+    public function getCreditorBic()
+    {
+        return $this->creditorBic;
+    }
+    /**
+     * Set creditorIcs
+     *
+     * @param string $creditorIcs
+     *
+     * @return BillingExportSetting
+     */
+    public function setCreditorIcs($creditorIcs)
+    {
+        $this->creditorIcs = $creditorIcs;
+
+        return $this;
+    }
+    /**
+     * Get creditorIcs
+     *
+     * @return string
+     */
+    public function getCreditorIcs()
+    {
+        return $this->creditorIcs;
+    }
+    /**
+     * Set creditorLineOneAddress
+     *
+     * @param string $creditorLineOneAddress
+     *
+     * @return BillingExportSetting
+     */
+    public function setCreditorLineOneAddress($creditorLineOneAddress)
+    {
+        $this->creditorLineOneAddress = $creditorLineOneAddress;
+
+        return $this;
+    }
+    /**
+     * Get creditorLineOneAddress
+     *
+     * @return string
+     */
+    public function getCreditorLineOneAddress()
+    {
+        return $this->creditorLineOneAddress;
+    }
+    /**
+     * Set creditorLineTwoAddress
+     *
+     * @param string $creditorLineTwoAddress
+     *
+     * @return BillingExportSetting
+     */
+    public function setCreditorLineTwoAddress($creditorLineTwoAddress)
+    {
+        $this->creditorLineTwoAddress = $creditorLineTwoAddress;
+
+        return $this;
+    }
+    /**
+     * Get creditorLineTwoAddress
+     *
+     * @return string
+     */
+    public function getCreditorLineTwoAddress()
+    {
+        return $this->creditorLineTwoAddress;
+    }
+    /**
+     * Set creditorPublicInstitution
+     *
+     * @param string $creditorPublicInstitution
+     *
+     * @return BillingExportSetting
+     */
+    public function setCreditorPublicInstitution($creditorPublicInstitution)
+    {
+        $this->creditorPublicInstitution = $creditorPublicInstitution;
+
+        return $this;
+    }
+    /**
+     * Get creditorPublicInstitution
+     *
+     * @return string
+     */
+    public function getCreditorPublicInstitution()
+    {
+        return $this->creditorPublicInstitution;
+    }
+    /**
+     * Set creditorType
+     *
+     * @param string $creditorType
+     *
+     * @return BillingExportSetting
+     */
+    public function setCreditorType($creditorType)
+    {
+        $this->creditorType = $creditorType;
+
+        return $this;
+    }
+    /**
+     * Get creditorType
+     *
+     * @return string
+     */
+    public function getCreditorType()
+    {
+        return $this->creditorType;
+    }
+    /**
+     * Set creditorName
+     *
+     * @param string $creditorName
+     *
+     * @return BillingExportSetting
+     */
+    public function setCreditorName($creditorName)
+    {
+        $this->creditorName = $creditorName;
+
+        return $this;
+    }
+    /**
+     * Get creditorName
+     *
+     * @return string
+     */
+    public function getCreditorName()
+    {
+        return $this->creditorName;
+    }
+    /**
+     * Set court
+     *
+     * @param string $court
+     *
+     * @return BillingExportSetting
+     */
+    public function setCourt($court)
+    {
+        $this->court = $court;
+
+        return $this;
+    }
+    /**
+     * Get court
+     *
+     * @return string
+     */
+    public function getCourt()
+    {
+        return $this->court;
+    }
+    /**
+     * Set budgetaryArticleCode
+     *
+     * @param string $budgetaryArticleCode
+     *
+     * @return BillingExportSetting
+     */
+    public function setBudgetaryArticleCode($budgetaryArticleCode)
+    {
+        $this->budgetaryArticleCode = $budgetaryArticleCode;
+
+        return $this;
+    }
+    /**
+     * Get budgetaryArticleCode
+     *
+     * @return string
+     */
+    public function getBudgetaryArticleCode()
+    {
+        return $this->budgetaryArticleCode;
+    }
+    /**
+     * Set serviceCode
+     *
+     * @param string $serviceCode
+     *
+     * @return BillingExportSetting
+     */
+    public function setServiceCode($serviceCode)
+    {
+        $this->serviceCode = $serviceCode;
+
+        return $this;
+    }
+    /**
+     * Get serviceCode
+     *
+     * @return string
+     */
+    public function getServiceCode()
+    {
+        return $this->serviceCode;
+    }
+    /**
+     * Set codFunction
+     *
+     * @param string $codFunction
+     *
+     * @return BillingExportSetting
+     */
+    public function setCodFunction($codFunction)
+    {
+        $this->codFunction = $codFunction;
+
+        return $this;
+    }
+    /**
+     * Get codFunction
+     *
+     * @return string
+     */
+    public function getCodFunction()
+    {
+        return $this->codFunction;
+    }
+    /**
+     * Set payfipCustomerNumber
+     *
+     * @param string $payfipCustomerNumber
+     *
+     * @return BillingExportSetting
+     */
+    public function setPayfipCustomerNumber($payfipCustomerNumber)
+    {
+        $this->payfipCustomerNumber = $payfipCustomerNumber;
+
+        return $this;
+    }
+    /**
+     * Get payfipCustomerNumber
+     *
+     * @return string
+     */
+    public function getPayfipCustomerNumber()
+    {
+        return $this->payfipCustomerNumber;
+    }
+    /**
+     * @return string
+     */
+    public function getBergerLevraultSamplingMethod()
+    {
+        return $this->bergerLevraultSamplingMethod;
+    }
+    /**
+     * @param string $bergerLevraultSamplingMethod
+     */
+    public function setBergerLevraultSamplingMethod($bergerLevraultSamplingMethod)
+    {
+        $this->bergerLevraultSamplingMethod = $bergerLevraultSamplingMethod;
+    }
+    /**
+     * Set establishmentCode
+     *
+     * @param string $establishmentCode
+     *
+     * @return BillingExportSetting
+     */
+    public function setEstablishmentCode($establishmentCode)
+    {
+        $this->establishmentCode = $establishmentCode;
+
+        return $this;
+    }
+    /**
+     * Get establishmentCode
+     *
+     * @return string
+     */
+    public function getEstablishmentCode()
+    {
+        return $this->establishmentCode;
+    }
+    /**
+     * Set payfipStatus
+     *
+     * @param string $payfipStatus
+     *
+     * @return BillingExportSetting
+     */
+    public function setPayfipStatus($payfipStatus)
+    {
+        $this->payfipStatus = $payfipStatus;
+
+        return $this;
+    }
+    /**
+     * Get payfipStatus
+     *
+     * @return string
+     */
+    public function getPayfipStatus()
+    {
+        return $this->payfipStatus;
+    }
+    /**
+     * Add stageManager
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $stageManager
+     *
+     * @return BillingExportSetting
+     */
+    public function addStageManager(\AppBundle\Entity\AccessAndFunction\Access $stageManager)
+    {
+        $this->stageManagers[] = $stageManager;
+
+        return $this;
+    }
+    /**
+     * Remove stageManager
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $stageManager
+     */
+    public function removeStageManager(\AppBundle\Entity\AccessAndFunction\Access $stageManager)
+    {
+        $this->stageManagers->removeElement($stageManager);
+    }
+    /**
+     * Get stageManagers
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getStageManagers()
+    {
+        return $this->stageManagers;
+    }
+    /**
+     * Set rentalBudgetaryArticleCode
+     *
+     * @param string $rentalBudgetaryArticleCode
+     *
+     * @return BillingExportSetting
+     */
+    public function setRentalBudgetaryArticleCode($rentalBudgetaryArticleCode)
+    {
+        $this->rentalBudgetaryArticleCode = $rentalBudgetaryArticleCode;
+
+        return $this;
+    }
+    /**
+     * Get rentalBudgetaryArticleCode
+     *
+     * @return string
+     */
+    public function getRentalBudgetaryArticleCode()
+    {
+        return $this->rentalBudgetaryArticleCode;
+    }
+    /**
+     * Set payfipSeveralPayments
+     *
+     * @param boolean $payfipSeveralPayments
+     *
+     * @return BillingExportSetting
+     */
+    public function setPayfipSeveralPayments($payfipSeveralPayments)
+    {
+        $this->payfipSeveralPayments = $payfipSeveralPayments;
+
+        return $this;
+    }
+    /**
+     * Get payfipSeveralPayments
+     *
+     * @return boolean
+     */
+    public function getPayfipSeveralPayments()
+    {
+        return $this->payfipSeveralPayments;
+    }
+    /**
+     * Set lotReference
+     *
+     * @param string $lotReference
+     *
+     * @return BillingExportSetting
+     */
+    public function setLotReference($lotReference)
+    {
+        $this->lotReference = $lotReference;
+
+        return $this;
+    }
+    /**
+     * Get lotReference
+     *
+     * @return string
+     */
+    public function getLotReference()
+    {
+        return $this->lotReference;
+    }
+    /**
+     * Set directDebitCode
+     *
+     * @param string $directDebitCode
+     *
+     * @return BillingExportSetting
+     */
+    public function setDirectDebitCode($directDebitCode)
+    {
+        $this->directDebitCode = $directDebitCode;
+
+        return $this;
+    }
+    /**
+     * Get directDebitCode
+     *
+     * @return string
+     */
+    public function getDirectDebitCode()
+    {
+        return $this->directDebitCode;
+    }
+    /**
+     * Set functionalCode
+     *
+     * @param string $functionalCode
+     *
+     * @return BillingExportSetting
+     */
+    public function setFunctionalCode($functionalCode)
+    {
+        $this->functionalCode = $functionalCode;
+
+        return $this;
+    }
+    /**
+     * Get functionalCode
+     *
+     * @return string
+     */
+    public function getFunctionalCode()
+    {
+        return $this->functionalCode;
+    }
+    /**
+     * Set antenna
+     *
+     * @param string $antenna
+     *
+     * @return BillingExportSetting
+     */
+    public function setAntenna($antenna)
+    {
+        $this->antenna = $antenna;
+
+        return $this;
+    }
+    /**
+     * Get antenna
+     *
+     * @return string
+     */
+    public function getAntenna()
+    {
+        return $this->antenna;
+    }
+    /**
+     * Set teneurName
+     *
+     * @param string $teneurName
+     *
+     * @return BillingExportSetting
+     */
+    public function setTeneurName($teneurName)
+    {
+        $this->teneurName = $teneurName;
+
+        return $this;
+    }
+    /**
+     * Get teneurName
+     *
+     * @return string
+     */
+    public function getTeneurName()
+    {
+        return $this->teneurName;
+    }
+    /**
+     * Set teneur
+     *
+     * @param $teneur
+     */
+    public function setTeneur($teneur)
+    {
+        $this->teneur = $teneur;
+
+        return $this;
+    }
+    /**
+     * Get teneur
+     *
+     * @return
+     */
+    public function getTeneur()
+    {
+        return $this->teneur;
+    }
+}

+ 222 - 0
old/Entity/Billing/BillingIntangibleExcludeDate.php

@@ -0,0 +1,222 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\Product\EquipmentLoan;
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * BillingIntangibleExcludeDate.
+ * Indique les produits (BillingIntangible) déjà facturés
+ */
+#[ORM\Entity]
+class BillingIntangibleExcludeDate
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['billingintangibleexcludedate'])]
+    private $id;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: false)]
+    #[Assert\Date]
+    #[Groups(['billingintangibleexcludedate'])]
+    private $excludeDate;
+    /**
+     * @var AccessIntangible
+     */
+    #[ORM\ManyToOne(targetEntity: 'AccessIntangible', cascade: ['persist'], inversedBy: 'billingIntangibleExcludeDates')]
+    #[Groups(['billingintangibleexcludedate'])]
+    private $accessIntangible;
+    /**
+     * @var AccessFictionalIntangible
+     */
+    #[ORM\ManyToOne(targetEntity: 'AccessFictionalIntangible', cascade: ['persist'], inversedBy: 'billingIntangibleExcludeDates')]
+    #[Groups(['billingintangibleexcludedate'])]
+    private $accessFictionalIntangible;
+    /**
+     * @var EducationalProjectIntangible
+     */
+    #[ORM\ManyToOne(targetEntity: 'EducationalProjectIntangible', cascade: ['persist'], inversedBy: 'billingIntangibleExcludeDates')]
+    #[Groups(['billingintangibleexcludedate'])]
+    private $educationalProjectIntangible;
+    /**
+     * @var EquipmentLoan
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Product\EquipmentLoan', cascade: ['persist'], inversedBy: 'billingIntangibleExcludeDates')]
+    #[Groups(['billingintangibleexcludedate'])]
+    private $equipmentLoan;
+    /**
+     * @var Bill
+     */
+    #[ORM\ManyToOne(targetEntity: 'Bill', cascade: ['persist'], inversedBy: 'billingIntangibleExcludeDates')]
+    #[Groups(['billingintangibleexcludedate'])]
+    private $bill;
+    public function __construct()
+    {
+
+    }
+    /**
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Set excludeDate
+     *
+     * @param \DateTime $excludeDate
+     *
+     * @return BillingIntangibleExcludeDate
+     */
+    public function setExcludeDate($excludeDate)
+    {
+        $this->excludeDate = $excludeDate;
+
+        return $this;
+    }
+    /**
+     * Get excludeDate
+     *
+     * @return \DateTime
+     */
+    public function getExcludeDate()
+    {
+        return $this->excludeDate;
+    }
+    /**
+     * Set accessIntangible
+     *
+     * @param \AppBundle\Entity\Billing\AccessIntangible $accessIntangible
+     *
+     * @return BillingIntangibleExcludeDate
+     */
+    public function setAccessIntangible(\AppBundle\Entity\Billing\AccessIntangible $accessIntangible = null)
+    {
+        $this->accessIntangible = $accessIntangible;
+
+        return $this;
+    }
+    /**
+     * Get accessIntangible
+     *
+     * @return \AppBundle\Entity\Billing\AccessIntangible
+     */
+    public function getAccessIntangible()
+    {
+        return $this->accessIntangible;
+    }
+    /**
+     * Set bill
+     *
+     * @param \AppBundle\Entity\Billing\Bill $bill
+     *
+     * @return BillingIntangibleExcludeDate
+     */
+    public function setBill(\AppBundle\Entity\Billing\Bill $bill = null)
+    {
+        $this->bill = $bill;
+
+        return $this;
+    }
+    /**
+     * Get bill
+     *
+     * @return \AppBundle\Entity\Billing\Bill
+     */
+    public function getBill()
+    {
+        return $this->bill;
+    }
+    /**
+     * Set accessFictionalIntangible
+     *
+     * @param \AppBundle\Entity\Billing\AccessFictionalIntangible $accessFictionalIntangible
+     *
+     * @return BillingIntangibleExcludeDate
+     */
+    public function setAccessFictionalIntangible(\AppBundle\Entity\Billing\AccessFictionalIntangible $accessFictionalIntangible = null)
+    {
+        $this->accessFictionalIntangible = $accessFictionalIntangible;
+
+        return $this;
+    }
+    /**
+     * Get accessFictionalIntangible
+     *
+     * @return \AppBundle\Entity\Billing\AccessFictionalIntangible
+     */
+    public function getAccessFictionalIntangible()
+    {
+        return $this->accessFictionalIntangible;
+    }
+    /**
+     * Set educationalProjectIntangible
+     *
+     * @param \AppBundle\Entity\Billing\EducationalProjectIntangible $educationalProjectIntangible
+     *
+     * @return BillingIntangibleExcludeDate
+     */
+    public function setEducationalProjectIntangible(\AppBundle\Entity\Billing\EducationalProjectIntangible $educationalProjectIntangible = null)
+    {
+        $this->educationalProjectIntangible = $educationalProjectIntangible;
+
+        return $this;
+    }
+    /**
+     * Get educationalProjectIntangible
+     *
+     * @return \AppBundle\Entity\Billing\EducationalProjectIntangible
+     */
+    public function getEducationalProjectIntangible()
+    {
+        return $this->educationalProjectIntangible;
+    }
+    /**
+     * Set equipmentLoan
+     *
+     * @param \AppBundle\Entity\Product\EquipmentLoan $equipmentLoan
+     *
+     * @return BillingIntangibleExcludeDate
+     */
+    public function setEquipmentLoan(\AppBundle\Entity\Product\EquipmentLoan $equipmentLoan = null)
+    {
+        $this->equipmentLoan = $equipmentLoan;
+
+        return $this;
+    }
+    /**
+     * Get equipmentLoan
+     *
+     * @return \AppBundle\Entity\Product\EquipmentLoan
+     */
+    public function getEquipmentLoan()
+    {
+        return $this->equipmentLoan;
+    }
+}

+ 1090 - 0
old/Entity/Billing/BillingSetting.php

@@ -0,0 +1,1090 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Organization\Organization;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use AppBundle\Annotation\DefaultField;
+
+/**
+ * Paramètres globaux d'une Organization concernant la facturation
+ *
+ * @Iri("http://schema.org/BillingSettings")
+ */
+#[ORM\Entity]
+class BillingSetting
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['billingsetting'])]
+    private $id;
+    /**
+     * @var Organization
+     *
+     * @DefaultField
+     */
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Organization\Organization', inversedBy: 'billingSetting', fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['billingsetting', 'parameters'])]
+    private $organization;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\PeriodicityEnum', 'toArray'])]
+    #[Groups(['billingsetting'])]
+    private $periodicity;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['billingsetting'])]
+    private $applyAdhesion = false;
+    /**
+     * @var array
+     */
+    #[ORM\Column(type: 'json_array', nullable: true)]
+    #[Groups(['billingsetting'])]
+    private $adhesion;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\PeriodicityEnum', 'toArray'])]
+    #[Groups(['billingsetting'])]
+    private $adhesionPeriodicity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['billingsetting'])]
+    private $paymentNumber;
+    /**
+     * @var ArrayCollection<ResidenceArea>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'ResidenceArea', mappedBy: 'billingSetting', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['billingsetting_residencearea', 'parameters'])]
+    private $residenceAreas;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['billingsetting'])]
+    private $applyVat = false;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['billingsetting'])]
+    private $amountVat;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingsetting'])]
+    private $headerMessage;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingsetting'])]
+    private $footerMessage;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['billingsetting'])]
+    private $adultAgeLimit;
+    /**
+     * @var ArrayCollection<FamilyQuotient>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'FamilyQuotient', mappedBy: 'billingSetting', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['billingsetting_familyquotient'])]
+    private $familyQuotients;
+    /**
+     * @var array
+     */
+    #[ORM\Column(type: 'json_array', nullable: true)]
+    #[Groups(['billingsetting'])]
+    private $reductionTotalAmount;
+    /**
+     * @var array
+     */
+    #[ORM\Column(type: 'json_array', nullable: true)]
+    #[Groups(['billingsetting'])]
+    private $billLine;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 10, nullable: true, options: ['default' => 'F'])]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Length(max: 10, maxMessage: 'invalid-max-length')]
+    #[Groups(['billingsetting'])]
+    private $prefixBillNumber = "F";
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true, options: ['default' => 6])]
+    #[Groups(['billingsetting'])]
+    private $digitsToDisplayBillNumber = 6;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true, options: ['default' => 1])]
+    #[Groups(['billingsetting'])]
+    private $initialBillNumber = 1;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 10, nullable: true, options: ['default' => 'A'])]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Length(max: 10, maxMessage: 'invalid-max-length')]
+    #[Groups(['billingsetting'])]
+    private $prefixBillCredit = "A";
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true, options: ['default' => 6])]
+    #[Groups(['billingsetting'])]
+    private $digitsToDisplayBillCredit = 6;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true, options: ['default' => 1])]
+    #[Groups(['billingsetting'])]
+    private $initialCreditNumber = 1;
+    /**
+     * @var BillingSettingRent
+     */
+    #[Assert\Valid]
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Billing\BillingSettingRent', mappedBy: 'billingSetting', cascade: ['persist'], orphanRemoval: true, fetch: 'EAGER')]
+    #[Groups(['billingsetting'])]
+    private $billingSettingRent;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['billingsetting'])]
+    private $automaticFFECLicensing = false;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\FamilyReductionTypeEnum', 'toArray'])]
+    #[Groups(['billingsetting'])]
+    private $familyReductionType;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['billingsetting'])]
+    private $lockBilling = false;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', options: ['default' => 'WITHOUT_ORDER'])]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\OrderAdultTypeEnum', 'toArray'])]
+    #[Groups(['billingsetting'])]
+    private $orderAdultType = "WITHOUT_ORDER";
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', options: ['default' => 'ONLY_AGE'])]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\AdultConditionTypeEnum', 'toArray'])]
+    #[Groups(['billingsetting'])]
+    private $adultConditionType = "ONLY_AGE";
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => true])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['billingsetting'])]
+    private $includeRentalInBilling = true;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 7, nullable: true)]
+    #[Assert\Length(max: 7, maxMessage: 'invalid-max-length')]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingsetting'])]
+    private $reductionTotalAccountingCode;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['billingsetting'])]
+    private $reductionTotalNature;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 200, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingsetting'])]
+    private $reductionTotalAccountingCodelabel;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true, options: ['default' => '0.2'])]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['billingsetting'])]
+    private $amountMinorDifference = 0.2;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['billingsetting'])]
+    private $ignoreZeroTotalAmountExport = false;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: false, options: ['default' => 1])]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Assert\NotNull]
+    #[Assert\Range(min: 1, max: 31, minMessage: 'valeur minimum: {{ limit }}', maxMessage: 'valeur maximale: {{ limit }}')]
+    #[Groups(['billingsetting'])]
+    private $dayOfMonthBillPayments = 1;
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+        $this->residenceAreas = new ArrayCollection();
+        $this->familyQuotients = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set periodicity
+     *
+     * @param string $periodicity
+     *
+     * @return BillingSetting
+     */
+    public function setPeriodicity($periodicity)
+    {
+        $this->periodicity = $periodicity;
+
+        return $this;
+    }
+    /**
+     * Get periodicity
+     *
+     * @return string
+     */
+    public function getPeriodicity()
+    {
+        return $this->periodicity;
+    }
+    /**
+     * Set adhesion
+     *
+     * @param array $adhesion
+     *
+     * @return BillingSetting
+     */
+    public function setAdhesion($adhesion)
+    {
+        $this->adhesion = $adhesion;
+
+        return $this;
+    }
+    /**
+     * Get adhesion
+     *
+     * @return array
+     */
+    public function getAdhesion()
+    {
+        return $this->adhesion;
+    }
+    /**
+     * Set paymentNumber
+     *
+     * @param integer $paymentNumber
+     *
+     * @return BillingSetting
+     */
+    public function setPaymentNumber($paymentNumber)
+    {
+        $this->paymentNumber = $paymentNumber;
+
+        return $this;
+    }
+    /**
+     * Get paymentNumber
+     *
+     * @return integer
+     */
+    public function getPaymentNumber()
+    {
+        return $this->paymentNumber;
+    }
+    /**
+     * Set applyVat
+     *
+     * @param boolean $applyVat
+     *
+     * @return BillingSetting
+     */
+    public function setApplyVat($applyVat)
+    {
+        $this->applyVat = $applyVat;
+
+        return $this;
+    }
+    /**
+     * Get applyVat
+     *
+     * @return boolean
+     */
+    public function getApplyVat()
+    {
+        return $this->applyVat;
+    }
+    /**
+     * Set amountVat
+     *
+     * @param float $amountVat
+     *
+     * @return BillingSetting
+     */
+    public function setAmountVat($amountVat)
+    {
+        $this->amountVat = floatval($amountVat);
+
+        return $this;
+    }
+    /**
+     * Get amountVat
+     *
+     * @return float
+     */
+    public function getAmountVat()
+    {
+        return $this->amountVat;
+    }
+    /**
+     * Set headerMessage
+     *
+     * @param string $headerMessage
+     *
+     * @return BillingSetting
+     */
+    public function setHeaderMessage($headerMessage)
+    {
+        $this->headerMessage = str_replace('&nbsp;', ' ', $headerMessage);
+
+        return $this;
+    }
+    /**
+     * Get headerMessage
+     *
+     * @return string
+     */
+    public function getHeaderMessage()
+    {
+        return $this->headerMessage;
+    }
+    /**
+     * Set footerMessage
+     *
+     * @param string $footerMessage
+     *
+     * @return BillingSetting
+     */
+    public function setFooterMessage($footerMessage)
+    {
+        $this->footerMessage = str_replace('&nbsp;', ' ', $footerMessage);
+
+        return $this;
+    }
+    /**
+     * Get footerMessage
+     *
+     * @return string
+     */
+    public function getFooterMessage()
+    {
+        return $this->footerMessage;
+    }
+    /**
+     * Add residenceArea
+     *
+     * @param \AppBundle\Entity\Billing\ResidenceArea $residenceArea
+     *
+     * @return BillingSetting
+     */
+    public function addResidenceArea(\AppBundle\Entity\Billing\ResidenceArea $residenceArea)
+    {
+        $residenceArea->setBillingSetting($this);
+        $this->residenceAreas[] = $residenceArea;
+
+        return $this;
+    }
+    /**
+     * Remove residenceArea
+     *
+     * @param \AppBundle\Entity\Billing\ResidenceArea $residenceArea
+     */
+    public function removeResidenceArea(\AppBundle\Entity\Billing\ResidenceArea $residenceArea)
+    {
+        $this->residenceAreas->removeElement($residenceArea);
+    }
+    /**
+     * Get residenceAreas
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getResidenceAreas()
+    {
+        return $this->residenceAreas;
+    }
+    /**
+     * Set organization
+     *
+     * @param \AppBundle\Entity\Organization\Organization $organization
+     *
+     * @return BillingSetting
+     */
+    public function setOrganization(\AppBundle\Entity\Organization\Organization $organization)
+    {
+        $this->organization = $organization;
+
+        return $this;
+    }
+    /**
+     * Get organization
+     *
+     * @return \AppBundle\Entity\Organization\Organization
+     */
+    public function getOrganization()
+    {
+        return $this->organization;
+    }
+    /**
+     * Add familyQuotient
+     *
+     * @param \AppBundle\Entity\Billing\FamilyQuotient $familyQuotient
+     *
+     * @return BillingSetting
+     */
+    public function addFamilyQuotient(\AppBundle\Entity\Billing\FamilyQuotient $familyQuotient)
+    {
+        $familyQuotient->setBillingSetting($this);
+        $this->familyQuotients[] = $familyQuotient;
+
+        return $this;
+    }
+    /**
+     * Remove familyQuotient
+     *
+     * @param \AppBundle\Entity\Billing\FamilyQuotient $familyQuotient
+     */
+    public function removeFamilyQuotient(\AppBundle\Entity\Billing\FamilyQuotient $familyQuotient)
+    {
+        $this->familyQuotients->removeElement($familyQuotient);
+    }
+    /**
+     * Get familyQuotients
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getFamilyQuotients()
+    {
+        return $this->familyQuotients;
+    }
+    /**
+     * Set reductionTotalAmount
+     *
+     * @param array $reductionTotalAmount
+     *
+     * @return BillingSetting
+     */
+    public function setReductionTotalAmount($reductionTotalAmount)
+    {
+        $this->reductionTotalAmount = $reductionTotalAmount;
+
+        return $this;
+    }
+    /**
+     * Get reductionTotalAmount
+     *
+     * @return array
+     */
+    public function getReductionTotalAmount()
+    {
+        return $this->reductionTotalAmount;
+    }
+    /**
+     * Set billLine
+     *
+     * @param array $billLine
+     *
+     * @return BillingSetting
+     */
+    public function setBillLine($billLine)
+    {
+        $this->billLine = $billLine;
+
+        return $this;
+    }
+    /**
+     * Get billLine
+     *
+     * @return array
+     */
+    public function getBillLine()
+    {
+        return $this->billLine;
+    }
+    /**
+     * Set initialBillNumber
+     *
+     * @param integer $initialBillNumber
+     *
+     * @return BillingSetting
+     */
+    public function setInitialBillNumber($initialBillNumber)
+    {
+        $this->initialBillNumber = $initialBillNumber;
+
+        return $this;
+    }
+    /**
+     * Get initialBillNumber
+     *
+     * @return integer
+     */
+    public function getInitialBillNumber()
+    {
+        return $this->initialBillNumber;
+    }
+    /**
+     * Set initialCreditNumber
+     *
+     * @param integer $initialCreditNumber
+     *
+     * @return BillingSetting
+     */
+    public function setInitialCreditNumber($initialCreditNumber)
+    {
+        $this->initialCreditNumber = $initialCreditNumber;
+
+        return $this;
+    }
+    /**
+     * Get initialCreditNumber
+     *
+     * @return integer
+     */
+    public function getInitialCreditNumber()
+    {
+        return $this->initialCreditNumber;
+    }
+    /**
+     * Set billingSettingRent
+     *
+     * @param \AppBundle\Entity\Billing\BillingSettingRent $billingSettingRent
+     *
+     * @return BillingSetting
+     */
+    public function setBillingSettingRent(\AppBundle\Entity\Billing\BillingSettingRent $billingSettingRent = null)
+    {
+        if (null !== $billingSettingRent) {
+            $billingSettingRent->setBillingSetting($this);
+            $this->billingSettingRent = $billingSettingRent;
+        }
+        return $this;
+    }
+    /**
+     * Get billingSettingRent
+     *
+     * @return \AppBundle\Entity\Billing\BillingSettingRent
+     */
+    public function getBillingSettingRent()
+    {
+        return $this->billingSettingRent;
+    }
+    /**
+     * Set adultAgeLimit
+     *
+     * @param integer $adultAgeLimit
+     *
+     * @return BillingSetting
+     */
+    public function setAdultAgeLimit($adultAgeLimit)
+    {
+        $this->adultAgeLimit = intval($adultAgeLimit);
+
+        return $this;
+    }
+    /**
+     * Get adultAgeLimit
+     *
+     * @return integer
+     */
+    public function getAdultAgeLimit()
+    {
+        return $this->adultAgeLimit;
+    }
+    /**
+     * Set adhesionPeriodicity
+     *
+     * @param string $adhesionPeriodicity
+     *
+     * @return BillingSetting
+     */
+    public function setAdhesionPeriodicity($adhesionPeriodicity)
+    {
+        $this->adhesionPeriodicity = $adhesionPeriodicity;
+
+        return $this;
+    }
+    /**
+     * Get adhesionPeriodicity
+     *
+     * @return string
+     */
+    public function getAdhesionPeriodicity()
+    {
+        return $this->adhesionPeriodicity;
+    }
+    /**
+     * Set automaticFFECLicensing
+     *
+     * @param boolean $automaticFFECLicensing
+     *
+     * @return BillingSetting
+     */
+    public function setAutomaticFFECLicensing($automaticFFECLicensing)
+    {
+        $this->automaticFFECLicensing = $automaticFFECLicensing;
+
+        return $this;
+    }
+    /**
+     * Get automaticFFECLicensing
+     *
+     * @return boolean
+     */
+    public function getAutomaticFFECLicensing()
+    {
+        return $this->automaticFFECLicensing;
+    }
+    /**
+     * Set familyReductionType
+     *
+     * @param string $familyReductionType
+     *
+     * @return BillingSetting
+     */
+    public function setFamilyReductionType($familyReductionType)
+    {
+        $this->familyReductionType = $familyReductionType;
+
+        return $this;
+    }
+    /**
+     * Get familyReductionType
+     *
+     * @return string
+     */
+    public function getFamilyReductionType()
+    {
+        return $this->familyReductionType;
+    }
+    /**
+     * Set prefixBillNumber
+     *
+     * @param string $prefixBillNumber
+     *
+     * @return BillingSetting
+     */
+    public function setPrefixBillNumber($prefixBillNumber)
+    {
+        $this->prefixBillNumber = $prefixBillNumber;
+
+        return $this;
+    }
+    /**
+     * Get prefixBillNumber
+     *
+     * @return string
+     */
+    public function getPrefixBillNumber()
+    {
+        return $this->prefixBillNumber;
+    }
+    /**
+     * Set digitsToDisplayBillNumber
+     *
+     * @param integer $digitsToDisplayBillNumber
+     *
+     * @return BillingSetting
+     */
+    public function setDigitsToDisplayBillNumber($digitsToDisplayBillNumber)
+    {
+        $this->digitsToDisplayBillNumber = intval($digitsToDisplayBillNumber);
+
+        return $this;
+    }
+    /**
+     * Get digitsToDisplayBillNumber
+     *
+     * @return integer
+     */
+    public function getDigitsToDisplayBillNumber()
+    {
+        return $this->digitsToDisplayBillNumber;
+    }
+    /**
+     * Set prefixBillCredit
+     *
+     * @param string $prefixBillCredit
+     *
+     * @return BillingSetting
+     */
+    public function setPrefixBillCredit($prefixBillCredit)
+    {
+        $this->prefixBillCredit = $prefixBillCredit;
+
+        return $this;
+    }
+    /**
+     * Get prefixBillCredit
+     *
+     * @return string
+     */
+    public function getPrefixBillCredit()
+    {
+        return $this->prefixBillCredit;
+    }
+    /**
+     * Set digitsToDisplayBillCredit
+     *
+     * @param integer $digitsToDisplayBillCredit
+     *
+     * @return BillingSetting
+     */
+    public function setDigitsToDisplayBillCredit($digitsToDisplayBillCredit)
+    {
+        $this->digitsToDisplayBillCredit = intval($digitsToDisplayBillCredit);
+
+        return $this;
+    }
+    /**
+     * Get digitsToDisplayBillCredit
+     *
+     * @return integer
+     */
+    public function getDigitsToDisplayBillCredit()
+    {
+        return $this->digitsToDisplayBillCredit;
+    }
+    /**
+     * Set lockBilling
+     *
+     * @param boolean $lockBilling
+     *
+     * @return BillingSetting
+     */
+    public function setLockBilling($lockBilling)
+    {
+        $this->lockBilling = $lockBilling;
+
+        return $this;
+    }
+    /**
+     * Get lockBilling
+     *
+     * @return boolean
+     */
+    public function getLockBilling()
+    {
+        return $this->lockBilling;
+    }
+    /**
+     * Set orderAdultType
+     *
+     * @param string $orderAdultType
+     *
+     * @return BillingSetting
+     */
+    public function setOrderAdultType($orderAdultType)
+    {
+        $this->orderAdultType = $orderAdultType;
+
+        return $this;
+    }
+    /**
+     * Get orderAdultType
+     *
+     * @return string
+     */
+    public function getOrderAdultType()
+    {
+        return $this->orderAdultType;
+    }
+    /**
+     * Set adultConditionType
+     *
+     * @param string $adultConditionType
+     *
+     * @return BillingSetting
+     */
+    public function setAdultConditionType($adultConditionType)
+    {
+        $this->adultConditionType = $adultConditionType;
+
+        return $this;
+    }
+    /**
+     * Get adultConditionType
+     *
+     * @return string
+     */
+    public function getAdultConditionType()
+    {
+        return $this->adultConditionType;
+    }
+    /**
+     * Set applyAdhesion
+     *
+     * @param boolean $applyAdhesion
+     *
+     * @return BillingSetting
+     */
+    public function setApplyAdhesion($applyAdhesion)
+    {
+        $this->applyAdhesion = $applyAdhesion;
+
+        return $this;
+    }
+    /**
+     * Get applyAdhesion
+     *
+     * @return boolean
+     */
+    public function getApplyAdhesion()
+    {
+        return $this->applyAdhesion;
+    }
+    /**
+     * Set includeRentalInBilling
+     *
+     * @param boolean $includeRentalInBilling
+     *
+     * @return BillingSetting
+     */
+    public function setIncludeRentalInBilling($includeRentalInBilling)
+    {
+        $this->includeRentalInBilling = $includeRentalInBilling;
+
+        return $this;
+    }
+    /**
+     * Get includeRentalInBilling
+     *
+     * @return boolean
+     */
+    public function getIncludeRentalInBilling()
+    {
+        return $this->includeRentalInBilling;
+    }
+    /**
+     * Set reductionTotalAccountingCode
+     *
+     * @param string $reductionTotalAccountingCode
+     *
+     * @return BillingSetting
+     */
+    public function setReductionTotalAccountingCode($reductionTotalAccountingCode)
+    {
+        $this->reductionTotalAccountingCode = $reductionTotalAccountingCode;
+
+        return $this;
+    }
+    /**
+     * Get reductionTotalAccountingCode
+     *
+     * @return string
+     */
+    public function getReductionTotalAccountingCode()
+    {
+        return $this->reductionTotalAccountingCode;
+    }
+    /**
+     * Set reductionTotalNature
+     *
+     * @param integer $reductionTotalNature
+     *
+     * @return BillingSetting
+     */
+    public function setReductionTotalNature($reductionTotalNature)
+    {
+        $this->reductionTotalNature = $reductionTotalNature;
+
+        return $this;
+    }
+    /**
+     * Get reductionTotalNature
+     *
+     * @return integer
+     */
+    public function getReductionTotalNature()
+    {
+        return $this->reductionTotalNature;
+    }
+    /**
+     * Set reductionTotalAccountingCodelabel
+     *
+     * @param string $reductionTotalAccountingCodelabel
+     *
+     * @return BillingSetting
+     */
+    public function setReductionTotalAccountingCodelabel($reductionTotalAccountingCodelabel)
+    {
+        $this->reductionTotalAccountingCodelabel = $reductionTotalAccountingCodelabel;
+
+        return $this;
+    }
+    /**
+     * Get reductionTotalAccountingCodelabel
+     *
+     * @return string
+     */
+    public function getReductionTotalAccountingCodelabel()
+    {
+        return $this->reductionTotalAccountingCodelabel;
+    }
+    /**
+     * Set amountMinorDifference
+     *
+     * @param float $amountMinorDifference
+     *
+     * @return BillingSetting
+     */
+    public function setAmountMinorDifference($amountMinorDifference)
+    {
+        $this->amountMinorDifference = floatval($amountMinorDifference);
+
+        return $this;
+    }
+    /**
+     * Get amountMinorDifference
+     *
+     * @return float
+     */
+    public function getAmountMinorDifference()
+    {
+        return $this->amountMinorDifference;
+    }
+    /**
+     * Set ignoreZeroTotalAmountExport
+     *
+     * @param boolean $ignoreZeroTotalAmountExport
+     *
+     * @return BillingSetting
+     */
+    public function setIgnoreZeroTotalAmountExport($ignoreZeroTotalAmountExport)
+    {
+        $this->ignoreZeroTotalAmountExport = $ignoreZeroTotalAmountExport;
+
+        return $this;
+    }
+    /**
+     * Get ignoreZeroTotalAmountExport
+     *
+     * @return boolean
+     */
+    public function getIgnoreZeroTotalAmountExport()
+    {
+        return $this->ignoreZeroTotalAmountExport;
+    }
+    /**
+     * Set dayOfMonthBillPayments
+     *
+     * @param integer $dayOfMonthBillPayments
+     *
+     * @return BillingSetting
+     */
+    public function setDayOfMonthBillPayments($dayOfMonthBillPayments)
+    {
+        $this->dayOfMonthBillPayments = $dayOfMonthBillPayments;
+
+        return $this;
+    }
+    /**
+     * Get dayOfMonthBillPayments
+     *
+     * @return integer
+     */
+    public function getDayOfMonthBillPayments()
+    {
+        return $this->dayOfMonthBillPayments;
+    }
+}

+ 495 - 0
old/Entity/Billing/BillingSettingRent.php

@@ -0,0 +1,495 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\Organization\Organization;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use AppBundle\Annotation\DefaultField;
+
+/**
+ * Paramètres globaux d'une Organization concernant la facturation liée à la location
+ *
+ * @Iri("http://schema.org/BillingSettingRent")
+ */
+#[ORM\Entity]
+class BillingSettingRent
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['billingsettingrent'])]
+    private $id;
+    /**
+     * @var BillingSetting
+     */
+    #[ORM\OneToOne(targetEntity: 'BillingSetting', inversedBy: 'billingSettingRent', fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['billingsettingrent'])]
+    private $billingSetting;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\ReductionTypeEnum', 'toArray'])]
+    #[Groups(['billingsettingrent'])]
+    private $reductionType;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['billingsettingrent'])]
+    private $thresholdFirstAmount;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['billingsettingrent'])]
+    private $thresholdSecondAmount;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['billingsettingrent'])]
+    private $thresholdNumberYear;
+    /**
+     * @var array
+     */
+    #[ORM\Column(type: 'json_array', nullable: true)]
+    #[Groups(['billingsettingrent'])]
+    private $instrumentFamilyReduction;
+    /**
+     * @var array
+     */
+    #[ORM\Column(type: 'json_array', nullable: true)]
+    #[Groups(['billingsettingrent'])]
+    private $purchaseDateReduction;
+    /**
+     * @var array
+     */
+    #[ORM\Column(type: 'json_array', nullable: true)]
+    #[Groups(['billingsettingrent'])]
+    private $purchaseAmountReduction;
+    /**
+     * @var array
+     */
+    #[ORM\Column(type: 'json_array', nullable: true)]
+    #[Groups(['billingsettingrent'])]
+    private $rentalYearsReduction;
+    /**
+     * @var array
+     */
+    #[ORM\Column(type: 'json_array', nullable: true)]
+    #[Groups(['billingsettingrent'])]
+    private $instrumentFamilyAndRentalYearsReduction;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['billingsettingrent'])]
+    private $singleAmount;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Billing\PeriodicityEnum', 'toArray'])]
+    #[Groups(['billingsettingrent'])]
+    private $periodicity;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 7, nullable: true)]
+    #[Assert\Length(max: 7, maxMessage: 'invalid-max-length')]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingsettingrent'])]
+    private $accountingCode;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['billingsettingrent'])]
+    private $nature;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 200, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['billingsettingrent'])]
+    private $accountingCodelabel;
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set reductionType
+     *
+     * @param string $reductionType
+     *
+     * @return BillingSettingRent
+     */
+    public function setReductionType($reductionType)
+    {
+        $this->reductionType = $reductionType;
+
+        return $this;
+    }
+    /**
+     * Get reductionType
+     *
+     * @return string
+     */
+    public function getReductionType()
+    {
+        return $this->reductionType;
+    }
+    /**
+     * Set instrumentFamilyReduction
+     *
+     * @param array $instrumentFamilyReduction
+     *
+     * @return BillingSettingRent
+     */
+    public function setInstrumentFamilyReduction($instrumentFamilyReduction)
+    {
+        $this->instrumentFamilyReduction = $instrumentFamilyReduction;
+
+        return $this;
+    }
+    /**
+     * Get instrumentFamilyReduction
+     *
+     * @return array
+     */
+    public function getInstrumentFamilyReduction()
+    {
+        return $this->instrumentFamilyReduction;
+    }
+    /**
+     * Set purchaseDateReduction
+     *
+     * @param array $purchaseDateReduction
+     *
+     * @return BillingSettingRent
+     */
+    public function setPurchaseDateReduction($purchaseDateReduction)
+    {
+        $this->purchaseDateReduction = $purchaseDateReduction;
+
+        return $this;
+    }
+    /**
+     * Get purchaseDateReduction
+     *
+     * @return array
+     */
+    public function getPurchaseDateReduction()
+    {
+        return $this->purchaseDateReduction;
+    }
+    /**
+     * Set purchaseAmountReduction
+     *
+     * @param array $purchaseAmountReduction
+     *
+     * @return BillingSettingRent
+     */
+    public function setPurchaseAmountReduction($purchaseAmountReduction)
+    {
+        $this->purchaseAmountReduction = $purchaseAmountReduction;
+
+        return $this;
+    }
+    /**
+     * Get purchaseAmountReduction
+     *
+     * @return array
+     */
+    public function getPurchaseAmountReduction()
+    {
+        return $this->purchaseAmountReduction;
+    }
+    /**
+     * Set rentalYearsReduction
+     *
+     * @param array $rentalYearsReduction
+     *
+     * @return BillingSettingRent
+     */
+    public function setRentalYearsReduction($rentalYearsReduction)
+    {
+        $this->rentalYearsReduction = $rentalYearsReduction;
+
+        return $this;
+    }
+    /**
+     * Get rentalYearsReduction
+     *
+     * @return array
+     */
+    public function getRentalYearsReduction()
+    {
+        return $this->rentalYearsReduction;
+    }
+    /**
+     * Set billingSetting
+     *
+     * @param \AppBundle\Entity\Billing\BillingSetting $billingSetting
+     *
+     * @return BillingSettingRent
+     */
+    public function setBillingSetting(\AppBundle\Entity\Billing\BillingSetting $billingSetting)
+    {
+        $this->billingSetting = $billingSetting;
+
+        return $this;
+    }
+    /**
+     * Get billingSetting
+     *
+     * @return \AppBundle\Entity\Billing\BillingSetting
+     */
+    public function getBillingSetting()
+    {
+        return $this->billingSetting;
+    }
+    /**
+     * Set thresholdFirstAmount
+     *
+     * @param float $thresholdFirstAmount
+     *
+     * @return BillingSettingRent
+     */
+    public function setThresholdFirstAmount($thresholdFirstAmount)
+    {
+        $this->thresholdFirstAmount = floatval($thresholdFirstAmount);
+
+        return $this;
+    }
+    /**
+     * Get thresholdFirstAmount
+     *
+     * @return float
+     */
+    public function getThresholdFirstAmount()
+    {
+        return $this->thresholdFirstAmount;
+    }
+    /**
+     * Set thresholdSecondAmount
+     *
+     * @param float $thresholdSecondAmount
+     *
+     * @return BillingSettingRent
+     */
+    public function setThresholdSecondAmount($thresholdSecondAmount)
+    {
+        $this->thresholdSecondAmount = floatval($thresholdSecondAmount);
+
+        return $this;
+    }
+    /**
+     * Get thresholdSecondAmount
+     *
+     * @return float
+     */
+    public function getThresholdSecondAmount()
+    {
+        return $this->thresholdSecondAmount;
+    }
+    /**
+     * Set thresholdNumberYear
+     *
+     * @param \Integer $thresholdNumberYear
+     *
+     * @return BillingSettingRent
+     */
+    public function setThresholdNumberYear($thresholdNumberYear)
+    {
+        $this->thresholdNumberYear = $thresholdNumberYear;
+
+        return $this;
+    }
+    /**
+     * Get thresholdNumberYear
+     *
+     * @return \Integer
+     */
+    public function getThresholdNumberYear()
+    {
+        return $this->thresholdNumberYear;
+    }
+    /**
+     * Set instrumentFamilyAndRentalYearsReduction
+     *
+     * @param array $instrumentFamilyAndRentalYearsReduction
+     *
+     * @return BillingSettingRent
+     */
+    public function setInstrumentFamilyAndRentalYearsReduction($instrumentFamilyAndRentalYearsReduction)
+    {
+        $this->instrumentFamilyAndRentalYearsReduction = $instrumentFamilyAndRentalYearsReduction;
+
+        return $this;
+    }
+    /**
+     * Get instrumentFamilyAndRentalYearsReduction
+     *
+     * @return array
+     */
+    public function getInstrumentFamilyAndRentalYearsReduction()
+    {
+        return $this->instrumentFamilyAndRentalYearsReduction;
+    }
+    /**
+     * Set singleAmount
+     *
+     * @param float $singleAmount
+     *
+     * @return BillingSettingRent
+     */
+    public function setSingleAmount($singleAmount)
+    {
+        $this->singleAmount = floatval($singleAmount);
+
+        return $this;
+    }
+    /**
+     * Get singleAmount
+     *
+     * @return float
+     */
+    public function getSingleAmount()
+    {
+        return $this->singleAmount;
+    }
+    /**
+     * Set periodicity
+     *
+     * @param string $periodicity
+     *
+     * @return BillingSettingRent
+     */
+    public function setPeriodicity($periodicity)
+    {
+        $this->periodicity = $periodicity;
+
+        return $this;
+    }
+    /**
+     * Get periodicity
+     *
+     * @return string
+     */
+    public function getPeriodicity()
+    {
+        return $this->periodicity;
+    }
+    /**
+     * Set accountingCode
+     *
+     * @param integer $accountingCode
+     *
+     * @return BillingSettingRent
+     */
+    public function setAccountingCode($accountingCode)
+    {
+        $this->accountingCode = $accountingCode;
+
+        return $this;
+    }
+    /**
+     * Get accountingCode
+     *
+     * @return integer
+     */
+    public function getAccountingCode()
+    {
+        return $this->accountingCode;
+    }
+    /**
+     * Set nature
+     *
+     * @param integer $nature
+     *
+     * @return BillingSettingRent
+     */
+    public function setNature($nature)
+    {
+        $this->nature = $nature;
+
+        return $this;
+    }
+    /**
+     * Get nature
+     *
+     * @return integer
+     */
+    public function getNature()
+    {
+        return $this->nature;
+    }
+    /**
+     * Set accountingCodelabel
+     *
+     * @param string $accountingCodelabel
+     *
+     * @return BillingSettingRent
+     */
+    public function setAccountingCodelabel($accountingCodelabel)
+    {
+        $this->accountingCodelabel = $accountingCodelabel;
+
+        return $this;
+    }
+    /**
+     * Get accountingCodelabel
+     *
+     * @return string
+     */
+    public function getAccountingCodelabel()
+    {
+        return $this->accountingCodelabel;
+    }
+}

+ 161 - 0
old/Entity/Billing/Ciril.php

@@ -0,0 +1,161 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Booking\EducationalProject;
+use AppBundle\Entity\Core\File;
+use AppBundle\Entity\Product\EquipmentLoan;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+use Doctrine\Common\Collections\ArrayCollection;
+
+
+/**
+ * Fais le lien entre les Bill concernées par l'export et le File généré
+ *
+ * @Iri("http://schema.org/Ciril")
+ */
+#[ORM\Entity]
+class Ciril
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['ciril'])]
+    private $id;
+    /**
+     * @var ArrayCollection<Bill>
+     */
+    #[ORM\OneToMany(targetEntity: 'Bill', mappedBy: 'ciril', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['ciril_bills'])]
+    private $bills;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['ciril', 'ciril_list'])]
+    private $date;
+    /**
+     * @var File
+     */
+    #[Assert\Valid]
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Core\File', cascade: ['persist'], fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['ciril', 'ciril_list'])]
+    private $file;
+    /**
+     * The constructor
+     */
+    public function __construct() {
+        $this->bills = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set date
+     *
+     * @param \DateTime $date
+     *
+     * @return Ciril
+     */
+    public function setDate($date)
+    {
+        $this->date = $date;
+
+        return $this;
+    }
+    /**
+     * Get date
+     *
+     * @return \DateTime
+     */
+    public function getDate()
+    {
+        return $this->date;
+    }
+    /**
+     * Add bill
+     *
+     * @param \AppBundle\Entity\Billing\Bill $bill
+     *
+     * @return Ciril
+     */
+    public function addBill(\AppBundle\Entity\Billing\Bill $bill)
+    {
+        $this->bills[] = $bill;
+
+        return $this;
+    }
+    /**
+     * Remove bill
+     *
+     * @param \AppBundle\Entity\Billing\Bill $bill
+     */
+    public function removeBill(\AppBundle\Entity\Billing\Bill $bill)
+    {
+        $this->bills->removeElement($bill);
+    }
+    /**
+     * Get bills
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBills()
+    {
+        return $this->bills;
+    }
+    /**
+     * Set file
+     *
+     * @param \AppBundle\Entity\Core\File $file
+     *
+     * @return Ciril
+     */
+    public function setFile(\AppBundle\Entity\Core\File $file = null)
+    {
+        $this->file = $file;
+
+        return $this;
+    }
+    /**
+     * Get file
+     *
+     * @return \AppBundle\Entity\Core\File
+     */
+    public function getFile()
+    {
+        return $this->file;
+    }
+}

+ 145 - 0
old/Entity/Billing/EducationalProjectIntangible.php

@@ -0,0 +1,145 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Booking\EducationalProject;
+use AppBundle\Entity\Product\Intangible;
+use AppBundle\Entity\Traits\LockableTrait;
+use AppBundle\Enum\Billing\PeriodicityTypeEnum;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+
+/**
+ * Fais le lien entre l'Access qui règle la facture et l'EducationalProject concerné
+ *
+ * @Iri("http://schema.org/EducationalProjectIntangible")
+ */
+#[ORM\Entity]
+class EducationalProjectIntangible extends AbstractBillingIntangible
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    use LockableTrait;
+    /**
+     * @var EducationalProject
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Booking\EducationalProject', inversedBy: 'educationalProjectIntangibles')]
+    #[Groups(['educationalprojectintangible'])]
+    private $educationalProject;
+    /**
+     * @var ArrayCollection<BillingIntangibleExcludeDate>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'BillingIntangibleExcludeDate', mappedBy: 'educationalProjectIntangible', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['accessintangible'])]
+    private $billingIntangibleExcludeDates;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['educationalprojectintangible'])]
+    private $unitPrice;
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+        parent::__construct();
+        $this->billingIntangibleExcludeDates = new ArrayCollection();
+    }
+    /**
+     * Set educationalProject
+     *
+     * @param \AppBundle\Entity\Booking\EducationalProject $educationalProject
+     *
+     * @return EducationalProjectIntangible
+     */
+    public function setEducationalProject(\AppBundle\Entity\Booking\EducationalProject $educationalProject)
+    {
+        $this->educationalProject = $educationalProject;
+
+        return $this;
+    }
+    /**
+     * Get educationalProject
+     *
+     * @return \AppBundle\Entity\Booking\EducationalProject
+     */
+    public function getEducationalProject()
+    {
+        return $this->educationalProject;
+    }
+    /**
+     * applyLock
+     */
+    public function applyLock()
+    {
+//        if(!is_null($this->getExcludeRule()) && $this->getIntangible()->getBillingPeriodicityType() === PeriodicityTypeEnum::PUNCTUAL){
+//            $this->setLockable(true);
+//        }
+    }
+    public function adminCanChange(){
+        return false;
+    }
+    /**
+     * Add billingIntangibleExcludeDate
+     *
+     * @param \AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate
+     *
+     * @return EducationalProjectIntangible
+     */
+    public function addBillingIntangibleExcludeDate(\AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate)
+    {
+        $this->billingIntangibleExcludeDates[] = $billingIntangibleExcludeDate;
+
+        return $this;
+    }
+    /**
+     * Remove billingIntangibleExcludeDate
+     *
+     * @param \AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate
+     */
+    public function removeBillingIntangibleExcludeDate(\AppBundle\Entity\Billing\BillingIntangibleExcludeDate $billingIntangibleExcludeDate)
+    {
+        $this->billingIntangibleExcludeDates->removeElement($billingIntangibleExcludeDate);
+    }
+    /**
+     * Get billingIntangibleExcludeDates
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBillingIntangibleExcludeDates()
+    {
+        return $this->billingIntangibleExcludeDates;
+    }
+    /**
+     * Set unitPrice
+     *
+     * @param float $unitPrice
+     *
+     * @return EducationalProjectIntangible
+     */
+    public function setUnitPrice($unitPrice)
+    {
+        $this->unitPrice = floatval($unitPrice);
+
+        return $this;
+    }
+    /**
+     * Get unitPrice
+     *
+     * @return float
+     */
+    public function getUnitPrice()
+    {
+        return $this->unitPrice;
+    }
+}

+ 82 - 0
old/Entity/Billing/EducationalProjectPayer.php

@@ -0,0 +1,82 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Booking\EducationalProject;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ *
+ * Fais le lien entre l'Access qui règle la facture et l'EducationalProject concerné
+ *
+ * @Iri("http://schema.org/EducationalProjectPayer")
+ */
+#[ORM\Entity]
+class EducationalProjectPayer extends AbstractBillingPayer
+{
+    /**
+     * @var Access
+     */
+    #[Assert\Valid]
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'billingEducationalProjectPayers', cascade: ['persist'])]
+    #[Groups(['educationalprojectpayer', 'educationalproject_details_billingreceivers', 'accessbilling_edit_billingeducationalprojectpayers'])]
+    private $educationalProjectPayer;
+    /**
+     * @var EducationalProject
+     */
+    #[Assert\Valid]
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Booking\EducationalProject', inversedBy: 'billingReceivers', cascade: ['persist'])]
+    #[Groups(['educationalprojectpayer', 'accessbilling_edit_billingeducationalprojectpayers'])]
+    private $educationalProjectReceiver;
+    /**
+     * Set educationalProjectReceiver
+     *
+     * @param \AppBundle\Entity\Booking\EducationalProject $educationalProjectReceiver
+     *
+     * @return EducationalProjectPayer
+     */
+    public function setEducationalProjectReceiver(\AppBundle\Entity\Booking\EducationalProject $educationalProjectReceiver = null)
+    {
+        $this->educationalProjectReceiver = $educationalProjectReceiver;
+
+        return $this;
+    }
+    /**
+     * Get educationalProjectReceiver
+     *
+     * @return \AppBundle\Entity\Booking\EducationalProject
+     */
+    public function getEducationalProjectReceiver()
+    {
+        return $this->educationalProjectReceiver;
+    }
+    /**
+     * Set educationalProjectPayer
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $educationalProjectPayer
+     *
+     * @return EducationalProjectPayer
+     */
+    public function setEducationalProjectPayer(\AppBundle\Entity\AccessAndFunction\Access $educationalProjectPayer = null)
+    {
+        $this->educationalProjectPayer = $educationalProjectPayer;
+
+        return $this;
+    }
+    /**
+     * Get educationalProjectPayer
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getEducationalProjectPayer()
+    {
+        return $this->educationalProjectPayer;
+    }
+}

+ 258 - 0
old/Entity/Billing/FamilyQuotient.php

@@ -0,0 +1,258 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Définition d'une tranche de quotient familial
+ *
+ * @Iri("http://schema.org/FamilyQuotient")
+ */
+#[ORM\Entity]
+class FamilyQuotient
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['familyquotient'])]
+    private $id;
+    /**
+     * @var BillingSetting
+     */
+    #[ORM\ManyToOne(targetEntity: 'BillingSetting', inversedBy: 'familyQuotients')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['familyquotient'])]
+    private $billingSetting;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['familyquotient', 'familyquotient_reference', 'payer_list_accessbilling', 'fusion_accesses_accessbilling', 'student_list_accessbilling'])]
+    private $sliceName;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['familyquotient', 'familyquotient_reference'])]
+    private $lowerBound;
+    /**
+     * @var string
+     *
+     *
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['familyquotient', 'familyquotient_reference'])]
+    private $upperBound;
+    /**
+     * @var ArrayCollection<AccessBilling>
+     */
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Billing\AccessBilling', mappedBy: 'familyQuotient')]
+    #[Groups(['familyquotient_accessbilling'])]
+    private $accessBilling;
+    /**
+     * @var ArrayCollection<IntangibleDiscountDetail>
+     */
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\IntangibleDiscountDetail', mappedBy: 'familyQuotient')]
+    #[Groups(['familyquotient_intangiblediscountdetail'])]
+    private $intangibleDiscountDetails;
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+        $this->accessBilling = new ArrayCollection();
+        $this->intangibleDiscountDetails = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set sliceName
+     *
+     * @param string $sliceName
+     *
+     * @return FamilyQuotient
+     */
+    public function setSliceName($sliceName)
+    {
+        $this->sliceName = $sliceName;
+
+        return $this;
+    }
+    /**
+     * Get sliceName
+     *
+     * @return string
+     */
+    public function getSliceName()
+    {
+        return $this->sliceName;
+    }
+    /**
+     * Set lowerBound
+     *
+     * @param string $lowerBound
+     *
+     * @return FamilyQuotient
+     */
+    public function setLowerBound($lowerBound)
+    {
+        $this->lowerBound = $lowerBound;
+
+        return $this;
+    }
+    /**
+     * Get lowerBound
+     *
+     * @return string
+     */
+    public function getLowerBound()
+    {
+        return $this->lowerBound;
+    }
+    /**
+     * Set upperBound
+     *
+     * @param string $upperBound
+     *
+     * @return FamilyQuotient
+     */
+    public function setUpperBound($upperBound)
+    {
+        $this->upperBound = $upperBound;
+
+        return $this;
+    }
+    /**
+     * Get upperBound
+     *
+     * @return string
+     */
+    public function getUpperBound()
+    {
+        return $this->upperBound;
+    }
+    /**
+     * Set billingSetting
+     *
+     * @param \AppBundle\Entity\Billing\BillingSetting $billingSetting
+     *
+     * @return FamilyQuotient
+     */
+    public function setBillingSetting(\AppBundle\Entity\Billing\BillingSetting $billingSetting)
+    {
+        $this->billingSetting = $billingSetting;
+
+        return $this;
+    }
+    /**
+     * Get billingSetting
+     *
+     * @return \AppBundle\Entity\Billing\BillingSetting
+     */
+    public function getBillingSetting()
+    {
+        return $this->billingSetting;
+    }
+    /**
+     * Add accessBilling
+     *
+     * @param \AppBundle\Entity\Billing\AccessBilling $accessBilling
+     *
+     * @return FamilyQuotient
+     */
+    public function addAccessBilling(\AppBundle\Entity\Billing\AccessBilling $accessBilling)
+    {
+        $this->accessBilling[] = $accessBilling;
+
+        return $this;
+    }
+    /**
+     * Remove accessBilling
+     *
+     * @param \AppBundle\Entity\Billing\AccessBilling $accessBilling
+     */
+    public function removeAccessBilling(\AppBundle\Entity\Billing\AccessBilling $accessBilling)
+    {
+        $this->accessBilling->removeElement($accessBilling);
+    }
+    /**
+     * Get accessBilling
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getAccessBilling()
+    {
+        return $this->accessBilling;
+    }
+    /**
+     * Add intangibleDiscountDetail
+     *
+     * @param \AppBundle\Entity\Product\IntangibleDiscountDetail $intangibleDiscountDetail
+     *
+     * @return FamilyQuotient
+     */
+    public function addIntangibleDiscountDetail(\AppBundle\Entity\Product\IntangibleDiscountDetail $intangibleDiscountDetail)
+    {
+        $this->intangibleDiscountDetails[] = $intangibleDiscountDetail;
+
+        return $this;
+    }
+    /**
+     * Remove intangibleDiscountDetail
+     *
+     * @param \AppBundle\Entity\Product\IntangibleDiscountDetail $intangibleDiscountDetail
+     */
+    public function removeIntangibleDiscountDetail(\AppBundle\Entity\Product\IntangibleDiscountDetail $intangibleDiscountDetail)
+    {
+        $this->intangibleDiscountDetails->removeElement($intangibleDiscountDetail);
+    }
+    /**
+     * Get intangibleDiscountDetails
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getIntangibleDiscountDetails()
+    {
+        return $this->intangibleDiscountDetails;
+    }
+}

+ 221 - 0
old/Entity/Billing/Jvs.php

@@ -0,0 +1,221 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Booking\EducationalProject;
+use AppBundle\Entity\Core\File;
+use AppBundle\Entity\Product\EquipmentLoan;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+use Doctrine\Common\Collections\ArrayCollection;
+
+
+/**
+ * Paramètres généraux d'un export Jvs
+ *
+ *
+ * @Iri("http://schema.org/Jvs")
+ */
+#[ORM\Entity]
+class Jvs
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['jvs', 'jvs_list', 'billaccounting_list'])]
+    private $id;
+    /**
+     * @var ArrayCollection<Bill>
+     */
+    #[ORM\OneToMany(targetEntity: 'Bill', mappedBy: 'jvs', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['jvs_bills'])]
+    private $bills;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['jvs', 'jvs_list'])]
+    private $date;
+    /**
+     * @var File
+     */
+    #[Assert\Valid]
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Core\File', cascade: ['persist'], fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['jvs', 'jvs_list'])]
+    private $file;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['jvs', 'jvs_list'])]
+    private $samplingDate;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Groups(['jvs', 'jvs_list'])]
+    #[Assert\NotNull]
+    private $withSampling = false;
+    /**
+     * The constructor
+     */
+    public function __construct() {
+        $this->bills = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set date
+     *
+     * @param \DateTime $date
+     *
+     * @return Pes
+     */
+    public function setDate($date)
+    {
+        $this->date = $date;
+
+        return $this;
+    }
+    /**
+     * Get date
+     *
+     * @return \DateTime
+     */
+    public function getDate()
+    {
+        return $this->date;
+    }
+    /**
+     * Set file
+     *
+     * @param \AppBundle\Entity\Core\File $file
+     *
+     * @return Pes
+     */
+    public function setFile(\AppBundle\Entity\Core\File $file = null)
+    {
+        $this->file = $file;
+
+        return $this;
+    }
+    /**
+     * Get file
+     *
+     * @return \AppBundle\Entity\Core\File
+     */
+    public function getFile()
+    {
+        return $this->file;
+    }
+    /**
+     * Add bill
+     *
+     * @param \AppBundle\Entity\Billing\Bill $bill
+     *
+     * @return Pes
+     */
+    public function addBill(\AppBundle\Entity\Billing\Bill $bill)
+    {
+        $this->bills[] = $bill;
+
+        return $this;
+    }
+    /**
+     * Remove bill
+     *
+     * @param \AppBundle\Entity\Billing\Bill $bill
+     */
+    public function removeBill(\AppBundle\Entity\Billing\Bill $bill)
+    {
+        $this->bills->removeElement($bill);
+    }
+    /**
+     * Get bills
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBills()
+    {
+        return $this->bills;
+    }
+    /**
+     * Set samplingDate
+     *
+     * @param \DateTime $samplingDate
+     *
+     * @return Pes
+     */
+    public function setSamplingDate($samplingDate)
+    {
+        $this->samplingDate = $samplingDate;
+
+        return $this;
+    }
+    /**
+     * Get samplingDate
+     *
+     * @return \DateTime
+     */
+    public function getSamplingDate()
+    {
+        return $this->samplingDate;
+    }
+    /**
+     * Set withSampling
+     *
+     * @param boolean $withSampling
+     *
+     * @return Pes
+     */
+    public function setWithSampling($withSampling)
+    {
+        $this->withSampling = $withSampling;
+
+        return $this;
+    }
+    /**
+     * Get withSampling
+     *
+     * @return boolean
+     */
+    public function getWithSampling()
+    {
+        return $this->withSampling;
+    }
+}

+ 471 - 0
old/Entity/Billing/PayfipPaymentReturn.php

@@ -0,0 +1,471 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Booking\EducationalProject;
+use AppBundle\Entity\Core\File;
+use AppBundle\Entity\Product\EquipmentLoan;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+use Doctrine\Common\Collections\ArrayCollection;
+
+
+/**
+ * PayfipReturn
+ *
+ * @see http://schema.org/PayfipPaymentReturn Documentation on Schema.org
+ *
+ * @Iri("http://schema.org/PayfipPaymentReturn")
+ */
+#[ORM\Entity]
+class PayfipPaymentReturn
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['pes', 'pes_list', 'billaccounting_list'])]
+    private $id;
+    /**
+     * @var Bill
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Billing\Bill', cascade: ['persist'])]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['payfipreturn'])]
+    private $bill;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Groups(['payfipreturn'])]
+    private $numcli;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Groups(['payfipreturn'])]
+    private $exerc;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['payfipreturn'])]
+    private $refdet;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['payfipreturn'])]
+    private $object;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Groups(['payfipreturn'])]
+    private $montant;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['payfipreturn'])]
+    private $mel;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['payfipreturn'])]
+    private $urlcl;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['payfipreturn'])]
+    private $saisie;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['payfipreturn'])]
+    private $resultrans;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['payfipreturn'])]
+    private $numautoCb;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['payfipreturn'])]
+    private $numautoPrel;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['pes', 'pes_list'])]
+    private $dattrans;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['pes', 'pes_list'])]
+    private $heurtrans;
+    /**
+     * The constructor
+     */
+    public function __construct() {
+        $this->bills = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set numcli
+     *
+     * @param integer $numcli
+     *
+     * @return PayfipReturn
+     */
+    public function setNumcli($numcli)
+    {
+        $this->numcli = $numcli;
+
+        return $this;
+    }
+    /**
+     * Get numcli
+     *
+     * @return integer
+     */
+    public function getNumcli()
+    {
+        return $this->numcli;
+    }
+    /**
+     * Set exerc
+     *
+     * @param integer $exerc
+     *
+     * @return PayfipReturn
+     */
+    public function setExerc($exerc)
+    {
+        $this->exerc = $exerc;
+
+        return $this;
+    }
+    /**
+     * Get exerc
+     *
+     * @return integer
+     */
+    public function getExerc()
+    {
+        return $this->exerc;
+    }
+    /**
+     * Set refdet
+     *
+     * @param string $refdet
+     *
+     * @return PayfipReturn
+     */
+    public function setRefdet($refdet)
+    {
+        $this->refdet = $refdet;
+
+        return $this;
+    }
+    /**
+     * Get refdet
+     *
+     * @return string
+     */
+    public function getRefdet()
+    {
+        return $this->refdet;
+    }
+    /**
+     * Set object
+     *
+     * @param string $object
+     *
+     * @return PayfipReturn
+     */
+    public function setObject($object)
+    {
+        $this->object = $object;
+
+        return $this;
+    }
+    /**
+     * Get object
+     *
+     * @return string
+     */
+    public function getObject()
+    {
+        return $this->object;
+    }
+    /**
+     * Set montant
+     *
+     * @param integer $montant
+     *
+     * @return PayfipReturn
+     */
+    public function setMontant($montant)
+    {
+        $this->montant = $montant;
+
+        return $this;
+    }
+    /**
+     * Get montant
+     *
+     * @return integer
+     */
+    public function getMontant()
+    {
+        return $this->montant;
+    }
+    /**
+     * Set mel
+     *
+     * @param string $mel
+     *
+     * @return PayfipReturn
+     */
+    public function setMel($mel)
+    {
+        $this->mel = $mel;
+
+        return $this;
+    }
+    /**
+     * Get mel
+     *
+     * @return string
+     */
+    public function getMel()
+    {
+        return $this->mel;
+    }
+    /**
+     * Set urlcl
+     *
+     * @param string $urlcl
+     *
+     * @return PayfipReturn
+     */
+    public function setUrlcl($urlcl)
+    {
+        $this->urlcl = $urlcl;
+
+        return $this;
+    }
+    /**
+     * Get urlcl
+     *
+     * @return string
+     */
+    public function getUrlcl()
+    {
+        return $this->urlcl;
+    }
+    /**
+     * Set saisie
+     *
+     * @param string $saisie
+     *
+     * @return PayfipReturn
+     */
+    public function setSaisie($saisie)
+    {
+        $this->saisie = $saisie;
+
+        return $this;
+    }
+    /**
+     * Get saisie
+     *
+     * @return string
+     */
+    public function getSaisie()
+    {
+        return $this->saisie;
+    }
+    /**
+     * Set resultrans
+     *
+     * @param string $resultrans
+     *
+     * @return PayfipReturn
+     */
+    public function setResultrans($resultrans)
+    {
+        $this->resultrans = $resultrans;
+
+        return $this;
+    }
+    /**
+     * Get resultrans
+     *
+     * @return string
+     */
+    public function getResultrans()
+    {
+        return $this->resultrans;
+    }
+    /**
+     * Set numautoCb
+     *
+     * @param string $numautoCb
+     *
+     * @return PayfipReturn
+     */
+    public function setNumautoCb($numautoCb)
+    {
+        $this->numautoCb = $numautoCb;
+
+        return $this;
+    }
+    /**
+     * Get numautoCb
+     *
+     * @return string
+     */
+    public function getNumautoCb()
+    {
+        return $this->numautoCb;
+    }
+    /**
+     * Set numautoPrel
+     *
+     * @param string $numautoPrel
+     *
+     * @return PayfipReturn
+     */
+    public function setNumautoPrel($numautoPrel)
+    {
+        $this->numautoPrel = $numautoPrel;
+
+        return $this;
+    }
+    /**
+     * Get numautoPrel
+     *
+     * @return string
+     */
+    public function getNumautoPrel()
+    {
+        return $this->numautoPrel;
+    }
+    /**
+     * Set dattrans
+     *
+     * @param \DateTime $dattrans
+     *
+     * @return PayfipReturn
+     */
+    public function setDattrans($dattrans)
+    {
+        $this->dattrans = $dattrans;
+
+        return $this;
+    }
+    /**
+     * Get dattrans
+     *
+     * @return \DateTime
+     */
+    public function getDattrans()
+    {
+        return $this->dattrans;
+    }
+    /**
+     * Set heurtrans
+     *
+     * @param \DateTime $heurtrans
+     *
+     * @return PayfipReturn
+     */
+    public function setHeurtrans($heurtrans)
+    {
+        $this->heurtrans = $heurtrans;
+
+        return $this;
+    }
+    /**
+     * Get heurtrans
+     *
+     * @return \DateTime
+     */
+    public function getHeurtrans()
+    {
+        return $this->heurtrans;
+    }
+    /**
+     * Set bill
+     *
+     * @param \AppBundle\Entity\Billing\Bill $bill
+     *
+     * @return PayfipPaymentReturn
+     */
+    public function setBill(\AppBundle\Entity\Billing\Bill $bill)
+    {
+        $this->bill = $bill;
+
+        return $this;
+    }
+    /**
+     * Get bill
+     *
+     * @return \AppBundle\Entity\Billing\Bill
+     */
+    public function getBill()
+    {
+        return $this->bill;
+    }
+}

+ 250 - 0
old/Entity/Billing/Pes.php

@@ -0,0 +1,250 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Booking\EducationalProject;
+use AppBundle\Entity\Core\File;
+use AppBundle\Entity\Product\EquipmentLoan;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
+use Doctrine\Common\Collections\ArrayCollection;
+
+
+/**
+ * Paramètres généraux d'un export PES
+ * NB: PES est un format de données demandé par le Trésor Public pour l'export des données comptables
+ *
+ * @Iri("http://schema.org/Pes")
+ */
+#[ORM\Entity]
+class Pes
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['pes', 'pes_list', 'billaccounting_list'])]
+    private $id;
+    /**
+     * @var ArrayCollection<Bill>
+     */
+    #[ORM\OneToMany(targetEntity: 'Bill', mappedBy: 'pes', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['pes_bills'])]
+    private $bills;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pes', 'pes_list', 'billaccounting_list_pes'])]
+    private $roleNumber;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['pes', 'pes_list'])]
+    private $date;
+    /**
+     * @var File
+     */
+    #[Assert\Valid]
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Core\File', cascade: ['persist'], fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['pes', 'pes_list'])]
+    private $file;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['pes', 'pes_list'])]
+    private $samplingDate;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Groups(['pes', 'pes_list'])]
+    #[Assert\NotNull]
+    private $withSampling = false;
+    /**
+     * The constructor
+     */
+    public function __construct() {
+        $this->bills = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set roleNumber
+     *
+     * @param string $roleNumber
+     *
+     * @return Pes
+     */
+    public function setRoleNumber($roleNumber)
+    {
+        $this->roleNumber = $roleNumber;
+
+        return $this;
+    }
+    /**
+     * Get roleNumber
+     *
+     * @return string
+     */
+    public function getRoleNumber()
+    {
+        return $this->roleNumber;
+    }
+    /**
+     * Set date
+     *
+     * @param \DateTime $date
+     *
+     * @return Pes
+     */
+    public function setDate($date)
+    {
+        $this->date = $date;
+
+        return $this;
+    }
+    /**
+     * Get date
+     *
+     * @return \DateTime
+     */
+    public function getDate()
+    {
+        return $this->date;
+    }
+    /**
+     * Set file
+     *
+     * @param \AppBundle\Entity\Core\File $file
+     *
+     * @return Pes
+     */
+    public function setFile(\AppBundle\Entity\Core\File $file = null)
+    {
+        $this->file = $file;
+
+        return $this;
+    }
+    /**
+     * Get file
+     *
+     * @return \AppBundle\Entity\Core\File
+     */
+    public function getFile()
+    {
+        return $this->file;
+    }
+    /**
+     * Add bill
+     *
+     * @param \AppBundle\Entity\Billing\Bill $bill
+     *
+     * @return Pes
+     */
+    public function addBill(\AppBundle\Entity\Billing\Bill $bill)
+    {
+        $this->bills[] = $bill;
+
+        return $this;
+    }
+    /**
+     * Remove bill
+     *
+     * @param \AppBundle\Entity\Billing\Bill $bill
+     */
+    public function removeBill(\AppBundle\Entity\Billing\Bill $bill)
+    {
+        $this->bills->removeElement($bill);
+    }
+    /**
+     * Get bills
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBills()
+    {
+        return $this->bills;
+    }
+    /**
+     * Set samplingDate
+     *
+     * @param \DateTime $samplingDate
+     *
+     * @return Pes
+     */
+    public function setSamplingDate($samplingDate)
+    {
+        $this->samplingDate = $samplingDate;
+
+        return $this;
+    }
+    /**
+     * Get samplingDate
+     *
+     * @return \DateTime
+     */
+    public function getSamplingDate()
+    {
+        return $this->samplingDate;
+    }
+    /**
+     * Set withSampling
+     *
+     * @param boolean $withSampling
+     *
+     * @return Pes
+     */
+    public function setWithSampling($withSampling)
+    {
+        $this->withSampling = $withSampling;
+
+        return $this;
+    }
+    /**
+     * Get withSampling
+     *
+     * @return boolean
+     */
+    public function getWithSampling()
+    {
+        return $this->withSampling;
+    }
+}

+ 577 - 0
old/Entity/Billing/PesSetting.php

@@ -0,0 +1,577 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\Organization\Organization;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use AppBundle\Annotation\DefaultField;
+
+/**
+ *
+ * (Plus utilisée, à confirmer)
+ *
+ * @Iri("http://schema.org/PesSettings")
+ */
+#[ORM\Entity]
+class PesSetting
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['pessetting'])]
+    private $id;
+    /**
+     * @var Organization
+     *
+     * @DefaultField
+     */
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Organization\Organization', inversedBy: 'pesSetting', fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['pessetting'])]
+    private $organization;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 14, nullable: true)]
+    #[Assert\Length(max: 14, maxMessage: 'invalid-max-length')]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pessetting'])]
+    private $idPost;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pessetting'])]
+    private $idColl;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pessetting'])]
+    private $idCollTipi;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pessetting'])]
+    private $codColl;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pessetting'])]
+    private $codBud;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pessetting'])]
+    private $codProd;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pessetting'])]
+    private $libelleColBud;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pessetting'])]
+    private $gestionnaire;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pessetting'])]
+    private $nameComptable;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pessetting'])]
+    private $creditorIban;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pessetting'])]
+    private $creditorBic;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pessetting'])]
+    private $creditorIcs;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pessetting'])]
+    private $creditorName;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pessetting'])]
+    private $creditorLineOneAddress;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pessetting'])]
+    private $creditorLineTwoAddress;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pessetting'])]
+    private $creditorPublicInstitution;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['pessetting'])]
+    private $creditorType;
+    /**
+     * Get id
+     *
+     * @return integer
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set organization
+     *
+     * @param \AppBundle\Entity\Organization\Organization $organization
+     *
+     * @return PesSetting
+     */
+    public function setOrganization(\AppBundle\Entity\Organization\Organization $organization)
+    {
+        $this->organization = $organization;
+
+        return $this;
+    }
+    /**
+     * Get organization
+     *
+     * @return \AppBundle\Entity\Organization\Organization
+     */
+    public function getOrganization()
+    {
+        return $this->organization;
+    }
+    /**
+     * Set idPost
+     *
+     * @param string $idPost
+     *
+     * @return PesSetting
+     */
+    public function setIdPost($idPost)
+    {
+        $this->idPost = $idPost;
+
+        return $this;
+    }
+    /**
+     * Get idPost
+     *
+     * @return string
+     */
+    public function getIdPost()
+    {
+        return $this->idPost;
+    }
+    /**
+     * Set idColl
+     *
+     * @param string $idColl
+     *
+     * @return PesSetting
+     */
+    public function setIdColl($idColl)
+    {
+        $this->idColl = $idColl;
+
+        return $this;
+    }
+    /**
+     * Get idColl
+     *
+     * @return string
+     */
+    public function getIdColl()
+    {
+        return $this->idColl;
+    }
+    /**
+     * Set idCollTipi
+     *
+     * @param string $idCollTipi
+     *
+     * @return PesSetting
+     */
+    public function setIdCollTipi($idCollTipi)
+    {
+        $this->idCollTipi = $idCollTipi;
+
+        return $this;
+    }
+    /**
+     * Get idCollTipi
+     *
+     * @return string
+     */
+    public function getIdCollTipi()
+    {
+        return $this->idCollTipi;
+    }
+    /**
+     * Set codColl
+     *
+     * @param string $codColl
+     *
+     * @return PesSetting
+     */
+    public function setCodColl($codColl)
+    {
+        $this->codColl = $codColl;
+
+        return $this;
+    }
+    /**
+     * Get codColl
+     *
+     * @return string
+     */
+    public function getCodColl()
+    {
+        return $this->codColl;
+    }
+    /**
+     * Set codBud
+     *
+     * @param string $codBud
+     *
+     * @return PesSetting
+     */
+    public function setCodBud($codBud)
+    {
+        $this->codBud = $codBud;
+
+        return $this;
+    }
+    /**
+     * Get codBud
+     *
+     * @return string
+     */
+    public function getCodBud()
+    {
+        return $this->codBud;
+    }
+    /**
+     * Set codProd
+     *
+     * @param string $codProd
+     *
+     * @return PesSetting
+     */
+    public function setCodProd($codProd)
+    {
+        $this->codProd = $codProd;
+
+        return $this;
+    }
+    /**
+     * Get codProd
+     *
+     * @return string
+     */
+    public function getCodProd()
+    {
+        return $this->codProd;
+    }
+    /**
+     * Get codProdPayFip
+     *
+     * @return string
+     */
+    public function getCodProdPayFip()
+    {
+        return mb_substr($this->codProd, 0, 2);
+    }
+    /**
+     * Set libelleColBud
+     *
+     * @param string $libelleColBud
+     *
+     * @return PesSetting
+     */
+    public function setLibelleColBud($libelleColBud)
+    {
+        $this->libelleColBud = $libelleColBud;
+
+        return $this;
+    }
+    /**
+     * Get libelleColBud
+     *
+     * @return string
+     */
+    public function getLibelleColBud()
+    {
+        return $this->libelleColBud;
+    }
+    /**
+     * Set gestionnaire
+     *
+     * @param string $gestionnaire
+     *
+     * @return PesSetting
+     */
+    public function setGestionnaire($gestionnaire)
+    {
+        $this->gestionnaire = $gestionnaire;
+
+        return $this;
+    }
+    /**
+     * Get gestionnaire
+     *
+     * @return string
+     */
+    public function getGestionnaire()
+    {
+        return $this->gestionnaire;
+    }
+    /**
+     * Set nameComptable
+     *
+     * @param string $nameComptable
+     *
+     * @return PesSetting
+     */
+    public function setNameComptable($nameComptable)
+    {
+        $this->nameComptable = $nameComptable;
+
+        return $this;
+    }
+    /**
+     * Get nameComptable
+     *
+     * @return string
+     */
+    public function getNameComptable()
+    {
+        return $this->nameComptable;
+    }
+    /**
+     * Set creditorIban
+     *
+     * @param string $creditorIban
+     *
+     * @return PesSetting
+     */
+    public function setCreditorIban($creditorIban)
+    {
+        $this->creditorIban = $creditorIban;
+
+        return $this;
+    }
+    /**
+     * Get creditorIban
+     *
+     * @return string
+     */
+    public function getCreditorIban()
+    {
+        return $this->creditorIban;
+    }
+    /**
+     * Set creditorBic
+     *
+     * @param string $creditorBic
+     *
+     * @return PesSetting
+     */
+    public function setCreditorBic($creditorBic)
+    {
+        $this->creditorBic = $creditorBic;
+
+        return $this;
+    }
+    /**
+     * Get creditorBic
+     *
+     * @return string
+     */
+    public function getCreditorBic()
+    {
+        return $this->creditorBic;
+    }
+    /**
+     * Set creditorIcs
+     *
+     * @param string $creditorIcs
+     *
+     * @return PesSetting
+     */
+    public function setCreditorIcs($creditorIcs)
+    {
+        $this->creditorIcs = $creditorIcs;
+
+        return $this;
+    }
+    /**
+     * Get creditorIcs
+     *
+     * @return string
+     */
+    public function getCreditorIcs()
+    {
+        return $this->creditorIcs;
+    }
+    /**
+     * Set creditorLineOneAddress
+     *
+     * @param string $creditorLineOneAddress
+     *
+     * @return PesSetting
+     */
+    public function setCreditorLineOneAddress($creditorLineOneAddress)
+    {
+        $this->creditorLineOneAddress = $creditorLineOneAddress;
+
+        return $this;
+    }
+    /**
+     * Get creditorLineOneAddress
+     *
+     * @return string
+     */
+    public function getCreditorLineOneAddress()
+    {
+        return $this->creditorLineOneAddress;
+    }
+    /**
+     * Set creditorLineTwoAddress
+     *
+     * @param string $creditorLineTwoAddress
+     *
+     * @return PesSetting
+     */
+    public function setCreditorLineTwoAddress($creditorLineTwoAddress)
+    {
+        $this->creditorLineTwoAddress = $creditorLineTwoAddress;
+
+        return $this;
+    }
+    /**
+     * Get creditorLineTwoAddress
+     *
+     * @return string
+     */
+    public function getCreditorLineTwoAddress()
+    {
+        return $this->creditorLineTwoAddress;
+    }
+    /**
+     * Set creditorPublicInstitution
+     *
+     * @param string $creditorPublicInstitution
+     *
+     * @return PesSetting
+     */
+    public function setCreditorPublicInstitution($creditorPublicInstitution)
+    {
+        $this->creditorPublicInstitution = $creditorPublicInstitution;
+
+        return $this;
+    }
+    /**
+     * Get creditorPublicInstitution
+     *
+     * @return string
+     */
+    public function getCreditorPublicInstitution()
+    {
+        return $this->creditorPublicInstitution;
+    }
+    /**
+     * Set creditorType
+     *
+     * @param string $creditorType
+     *
+     * @return PesSetting
+     */
+    public function setCreditorType($creditorType)
+    {
+        $this->creditorType = $creditorType;
+
+        return $this;
+    }
+    /**
+     * Get creditorType
+     *
+     * @return string
+     */
+    public function getCreditorType()
+    {
+        return $this->creditorType;
+    }
+    /**
+     * Set creditorName
+     *
+     * @param string $creditorName
+     *
+     * @return PesSetting
+     */
+    public function setCreditorName($creditorName)
+    {
+        $this->creditorName = $creditorName;
+
+        return $this;
+    }
+    /**
+     * Get creditorName
+     *
+     * @return string
+     */
+    public function getCreditorName()
+    {
+        return $this->creditorName;
+    }
+}

+ 34 - 0
old/Entity/Billing/Repository/AccessBillingRepository.php

@@ -0,0 +1,34 @@
+<?php
+
+namespace AppBundle\Entity\Billing\Repository;
+use AppBundle\Entity\Organization\Organization;
+use Doctrine\ORM\EntityRepository;
+
+/**
+ * Class AccessBillingRepository
+ * @package AppBundle\Entity\AccessAndFunction\Repository
+ */
+class AccessBillingRepository extends EntityRepository
+{
+
+    public function findAccessBillingByCustomerIdAndOrganization($entity,Organization $organization)
+    {
+
+        $customerId = $entity->getCustomerId();
+
+        $qb = $this->createQueryBuilder('ab');
+
+        $qb
+//            ->select('ab.customerId')
+            ->join('ab.access','acc')
+            ->andWhere('ab.customerId=:customerid')
+            ->andWhere('acc.organization=:org')
+            ->setParameter(':customerid',$customerId)
+            ->setParameter(':org',$organization)
+            ->setMaxResults(1);
+
+        return $qb->getQuery()->getOneOrNullResult();
+
+    }
+
+}

+ 52 - 0
old/Entity/Billing/Repository/AccessIntangibleRepository.php

@@ -0,0 +1,52 @@
+<?php
+
+namespace AppBundle\Entity\Billing\Repository;
+use AppBundle\Entity\Organization\Organization;
+use Doctrine\ORM\EntityRepository;
+
+/**
+ * Class  AccessIntangible
+ */
+class AccessIntangibleRepository extends EntityRepository
+{
+
+    public function findLicensesAccessIntangible(Organization $organization)
+    {
+
+
+        $qb = $this->createQueryBuilder('a');
+
+        $qb->innerJoin('AppBundle:Product\Intangible', 'i', 'WITH', 'a.intangible = i.id')
+            ->innerJoin('AppBundle:AccessAndFunction\Access', 'acc', 'WITH', 'a.access = acc.id')
+            ->where('i.label LIKE :licence')
+            ->andWhere('a.endDate IS NULL')
+            ->andWhere('acc.organization=:org')
+            ->setParameter(':org',$organization)
+            ->setParameter('licence', '%licence%');
+
+        return $qb->getQuery()->getResult();
+
+    }
+
+    public function getArchivedAccessIntangible($enDate, $organizationId)
+    {
+        $filter = $this->_em->getFilters()->enable('activity_year');
+        $filter->setParameter('disabledFilter', 1);
+        $qb = $this->createQueryBuilder('access_intangible');
+
+        $qb
+            ->innerJoin('access_intangible.access', 'access')
+            ->innerJoin('access.organization', 'organization')
+            ->andWhere('access_intangible.endDate = :enDate')
+            ->andWhere('organization.id = :id')
+            ->setParameter('id', $organizationId)
+            ->setParameter('enDate', $enDate)
+        ;
+
+        $filter->setParameter('disabledFilter', 0);
+        return $qb->getQuery()->getResult();
+    }
+
+}
+
+?>

+ 34 - 0
old/Entity/Billing/Repository/AdvancePaymentRepository.php

@@ -0,0 +1,34 @@
+<?php
+
+namespace AppBundle\Entity\Billing\Repository;
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Organization\Organization;
+use Doctrine\ORM\EntityRepository;
+
+/**
+ * Class AdvancePaymentRepository
+ */
+class AdvancePaymentRepository extends EntityRepository
+{
+
+    public function findByAccessAndSchoolYear(Access $access, $schoolYear)
+    {
+
+        $qb = $this->createQueryBuilder('o');
+
+        $qb
+            ->andWhere('o.access =:access')
+            ->andWhere('o.startSchoolYear = :schoolYear')
+            ->andWhere('o.bill is null')
+            //todo: PAS D'ACOMPTE NON PLUS !!!
+            ->setParameter('access', $access)
+            ->setParameter('schoolYear', $schoolYear)
+        ;
+
+        return $qb->getQuery()->getResult();
+
+    }
+
+}
+
+?>

+ 33 - 0
old/Entity/Billing/Repository/BillCreditRepository.php

@@ -0,0 +1,33 @@
+<?php
+
+namespace AppBundle\Entity\Billing\Repository;
+use AppBundle\Entity\Organization\Organization;
+use Doctrine\ORM\EntityRepository;
+
+/**
+ * Class BillRepository
+ * @package AppBundle\Entity\AccessAndFunction\Repository
+ */
+class BillCreditRepository extends EntityRepository
+{
+
+    public function findMaxBNumberByOrganization(Organization $organization)
+    {
+
+        $qb = $this->createQueryBuilder('b');
+
+        $qb->select('max(b.billCreditInteger) as billCreditNumber')
+            ->join('b.bill','bil')
+            ->join('bil.access','acc')
+            ->andWhere('acc.organization=:org')
+            ->orderBy('b.id', 'DESC')
+            ->setParameter(':org',$organization)
+            ->setMaxResults(1);
+
+        return $qb->getQuery()->getOneOrNullResult();
+
+    }
+
+}
+
+?>

+ 32 - 0
old/Entity/Billing/Repository/BillRepository.php

@@ -0,0 +1,32 @@
+<?php
+
+namespace AppBundle\Entity\Billing\Repository;
+use AppBundle\Entity\Organization\Organization;
+use Doctrine\ORM\EntityRepository;
+
+/**
+ * Class BillRepository
+ * @package AppBundle\Entity\AccessAndFunction\Repository
+ */
+class BillRepository extends EntityRepository
+{
+
+    public function findMaxBNumberByOrganization(Organization $organization)
+    {
+
+        $qb = $this->createQueryBuilder('b');
+
+        $qb->select('max(b.billNumberInteger) as billNumber')
+            ->join('b.access','acc')
+            ->andWhere('acc.organization=:org')
+            ->orderBy('b.id', 'DESC')
+            ->setParameter(':org',$organization)
+            ->setMaxResults(1);
+
+        return $qb->getQuery()->getOneOrNullResult();
+
+    }
+
+}
+
+?>

+ 25 - 0
old/Entity/Billing/Repository/SddBankRepository.php

@@ -0,0 +1,25 @@
+<?php
+
+namespace AppBundle\Entity\Billing\Repository;
+use AppBundle\Entity\Organization\Organization;
+use Doctrine\ORM\EntityRepository;
+
+/**
+ * Class SddBankRepository
+ * @package AppBundle\Entity\Billing\Repository
+ */
+class SddBankRepository extends EntityRepository
+{
+    public function getCountSddForOrganizationAndDate(Organization $organization, string $date)
+    {
+        $qb = $this->createQueryBuilder('sdd_bank');
+        $qb
+            ->join('sdd_bank.bills', 'bills')
+            ->andWhere('bills.organization=:org')
+            ->andWhere('sdd_bank.date LIKE :date')
+            ->setParameter(':org',$organization)
+            ->setParameter(':date',$date . '%');
+
+        return count($qb->getQuery()->getResult());
+    }
+}

+ 25 - 0
old/Entity/Billing/Repository/SddRegieRepository.php

@@ -0,0 +1,25 @@
+<?php
+
+namespace AppBundle\Entity\Billing\Repository;
+use AppBundle\Entity\Organization\Organization;
+use Doctrine\ORM\EntityRepository;
+
+/**
+ * Class SddRegieRepository
+ * @package AppBundle\Entity\Billing\Repository
+ */
+class SddRegieRepository extends EntityRepository
+{
+    public function getCountSddForOrganizationAndDate(Organization $organization, string $date)
+    {
+        $qb = $this->createQueryBuilder('sdd_regie');
+        $qb
+            ->join('sdd_regie.bills', 'bills')
+            ->andWhere('bills.organization=:org')
+            ->andWhere('sdd_bank.date LIKE :date')
+            ->setParameter(':org',$organization)
+            ->setParameter(':date',$date . '%');
+
+        return count($qb->getQuery()->getResult());
+    }
+}

+ 195 - 0
old/Entity/Billing/ResidenceArea.php

@@ -0,0 +1,195 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Zone de résidence d'un Access, telle que définie par l'Organization
+ *
+ * @Iri("http://schema.org/ResidenceArea")
+ */
+#[ORM\Entity]
+class ResidenceArea
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['residencearea', 'accesses_list_accessbilling'])]
+    private $id;
+    /**
+     * @var BillingSetting
+     */
+    #[ORM\ManyToOne(targetEntity: 'BillingSetting', inversedBy: 'residenceAreas')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['residencearea'])]
+    private $billingSetting;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string')]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Groups(['residencearea', 'residencearea_reference', 'access_details_accessbilling', 'accesses_list_accessbilling', 'student_list_accessbilling', 'guardians_list_accessbilling', 'adherent_list_accessbilling', 'payer_list_accessbilling', 'fusion_accesses_accessbilling'])]
+    private $label;
+    /**
+     * @var ArrayCollection<AccessBilling>
+     */
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Billing\AccessBilling', mappedBy: 'residenceArea')]
+    #[Groups(['residencearea_accessbilling'])]
+    private $accessBilling;
+    /**
+     * @var ArrayCollection<IntangibleDiscountDetail>
+     */
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Product\IntangibleDiscountDetail', mappedBy: 'residenceArea')]
+    #[Groups(['residencearea_intangiblediscountdetail'])]
+    private $intangibleDiscountDetails;
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+        $this->accessBilling = new ArrayCollection();
+        $this->intangibleDiscountDetails = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set label
+     *
+     * @param string $label
+     *
+     * @return ResidenceArea
+     */
+    public function setLabel($label)
+    {
+        $this->label = $label;
+
+        return $this;
+    }
+    /**
+     * Get label
+     *
+     * @return string
+     */
+    public function getLabel()
+    {
+        return $this->label;
+    }
+    /**
+     * Set billingSetting
+     *
+     * @param \AppBundle\Entity\Billing\BillingSetting $billingSetting
+     *
+     * @return ResidenceArea
+     */
+    public function setBillingSetting(\AppBundle\Entity\Billing\BillingSetting $billingSetting)
+    {
+        $this->billingSetting = $billingSetting;
+
+        return $this;
+    }
+    /**
+     * Get billingSetting
+     *
+     * @return \AppBundle\Entity\Billing\BillingSetting
+     */
+    public function getBillingSetting()
+    {
+        return $this->billingSetting;
+    }
+    /**
+     * Add accessBilling
+     *
+     * @param \AppBundle\Entity\Billing\AccessBilling $accessBilling
+     *
+     * @return ResidenceArea
+     */
+    public function addAccessBilling(\AppBundle\Entity\Billing\AccessBilling $accessBilling)
+    {
+        $this->accessBilling[] = $accessBilling;
+
+        return $this;
+    }
+    /**
+     * Remove accessBilling
+     *
+     * @param \AppBundle\Entity\Billing\AccessBilling $accessBilling
+     */
+    public function removeAccessBilling(\AppBundle\Entity\Billing\AccessBilling $accessBilling)
+    {
+        $this->accessBilling->removeElement($accessBilling);
+    }
+    /**
+     * Get accessBilling
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getAccessBilling()
+    {
+        return $this->accessBilling;
+    }
+    /**
+     * Add intangibleDiscountDetail
+     *
+     * @param \AppBundle\Entity\Product\IntangibleDiscountDetail $intangibleDiscountDetail
+     *
+     * @return ResidenceArea
+     */
+    public function addIntangibleDiscountDetail(\AppBundle\Entity\Product\IntangibleDiscountDetail $intangibleDiscountDetail)
+    {
+        $this->intangibleDiscountDetails[] = $intangibleDiscountDetail;
+
+        return $this;
+    }
+    /**
+     * Remove intangibleDiscountDetail
+     *
+     * @param \AppBundle\Entity\Product\IntangibleDiscountDetail $intangibleDiscountDetail
+     */
+    public function removeIntangibleDiscountDetail(\AppBundle\Entity\Product\IntangibleDiscountDetail $intangibleDiscountDetail)
+    {
+        $this->intangibleDiscountDetails->removeElement($intangibleDiscountDetail);
+    }
+    /**
+     * Get intangibleDiscountDetails
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getIntangibleDiscountDetails()
+    {
+        return $this->intangibleDiscountDetails;
+    }
+}

+ 185 - 0
old/Entity/Billing/SddBank.php

@@ -0,0 +1,185 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\Core\File;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Doctrine\Common\Collections\ArrayCollection;
+use Symfony\Component\Serializer\Annotation\Groups;
+
+
+/**
+ * Paramètres généraux d'un export Sdd bank
+ *
+ *
+ * @Iri("http://schema.org/Jvs")
+ */
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\Billing\Repository\SddBankRepository')]
+class SddBank
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['sddbank'])]
+    private $id;
+    /**
+     * @var ArrayCollection<Bill>
+     */
+    #[ORM\OneToMany(targetEntity: 'Bill', mappedBy: 'sddBank', orphanRemoval: true)]
+    private $bills;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['sddbank'])]
+    private $date;
+    /**
+     * @var File
+     */
+    #[Assert\Valid]
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Core\File', cascade: ['persist'], fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['sddbank'])]
+    private $file;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    private $samplingDate;
+    /**
+     * The constructor
+     */
+    public function __construct() {
+        $this->bills = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set date
+     *
+     * @param \DateTime $date
+     *
+     * @return Pes
+     */
+    public function setDate($date)
+    {
+        $this->date = $date;
+
+        return $this;
+    }
+    /**
+     * Get date
+     *
+     * @return \DateTime
+     */
+    public function getDate()
+    {
+        return $this->date;
+    }
+    /**
+     * Set file
+     *
+     * @param \AppBundle\Entity\Core\File $file
+     *
+     * @return Pes
+     */
+    public function setFile(\AppBundle\Entity\Core\File $file = null)
+    {
+        $this->file = $file;
+
+        return $this;
+    }
+    /**
+     * Get file
+     *
+     * @return \AppBundle\Entity\Core\File
+     */
+    public function getFile()
+    {
+        return $this->file;
+    }
+    /**
+     * Add bill
+     *
+     * @param \AppBundle\Entity\Billing\Bill $bill
+     *
+     * @return Pes
+     */
+    public function addBill(\AppBundle\Entity\Billing\Bill $bill)
+    {
+        $this->bills[] = $bill;
+
+        return $this;
+    }
+    /**
+     * Remove bill
+     *
+     * @param \AppBundle\Entity\Billing\Bill $bill
+     */
+    public function removeBill(\AppBundle\Entity\Billing\Bill $bill)
+    {
+        $this->bills->removeElement($bill);
+    }
+    /**
+     * Get bills
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBills()
+    {
+        return $this->bills;
+    }
+    /**
+     * Set samplingDate
+     *
+     * @param \DateTime $samplingDate
+     *
+     * @return Pes
+     */
+    public function setSamplingDate($samplingDate)
+    {
+        $this->samplingDate = $samplingDate;
+
+        return $this;
+    }
+    /**
+     * Get samplingDate
+     *
+     * @return \DateTime
+     */
+    public function getSamplingDate()
+    {
+        return $this->samplingDate;
+    }
+}

+ 215 - 0
old/Entity/Billing/SddRegie.php

@@ -0,0 +1,215 @@
+<?php
+
+namespace AppBundle\Entity\Billing;
+
+use AppBundle\Entity\Core\File;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Doctrine\Common\Collections\ArrayCollection;
+use Symfony\Component\Serializer\Annotation\Groups;
+
+
+/**
+ * Paramètres généraux d'un export Sdd regie
+ *
+ *
+ * @Iri("http://schema.org/Jvs")
+ */
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\Billing\Repository\SddRegieRepository')]
+class SddRegie
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['sddregie'])]
+    private $id;
+    /**
+     * @var ArrayCollection<Bill>
+     */
+    #[ORM\OneToMany(targetEntity: 'Bill', mappedBy: 'sddRegie', orphanRemoval: true)]
+    private $bills;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['sddregie'])]
+    private $date;
+    /**
+     * @var File
+     */
+    #[Assert\Valid]
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Core\File', cascade: ['persist'], fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['sddregie'])]
+    private $file;
+    /**
+     * @var File
+     */
+    #[Assert\Valid]
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Core\File', cascade: ['persist'], fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['sddregie'])]
+    private $bordereau;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    private $samplingDate;
+    /**
+     * The constructor
+     */
+    public function __construct() {
+        $this->bills = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set date
+     *
+     * @param \DateTime $date
+     *
+     * @return Pes
+     */
+    public function setDate($date)
+    {
+        $this->date = $date;
+
+        return $this;
+    }
+    /**
+     * Get date
+     *
+     * @return \DateTime
+     */
+    public function getDate()
+    {
+        return $this->date;
+    }
+    /**
+     * Set file
+     *
+     * @param \AppBundle\Entity\Core\File $file
+     *
+     * @return Pes
+     */
+    public function setFile(\AppBundle\Entity\Core\File $file = null)
+    {
+        $this->file = $file;
+
+        return $this;
+    }
+    /**
+     * Get $bordereau
+     *
+     * @return \AppBundle\Entity\Core\File
+     */
+    public function getBordereau()
+    {
+        return $this->bordereau;
+    }
+    /**
+     * Set $bordereau
+     *
+     * @param \AppBundle\Entity\Core\File $bordereau
+     *
+     * @return Pes
+     */
+    public function setBordereau(\AppBundle\Entity\Core\File $bordereau = null)
+    {
+        $this->bordereau = $bordereau;
+
+        return $this;
+    }
+    /**
+     * Get file
+     *
+     * @return \AppBundle\Entity\Core\File
+     */
+    public function getFile()
+    {
+        return $this->file;
+    }
+    /**
+     * Add bill
+     *
+     * @param \AppBundle\Entity\Billing\Bill $bill
+     *
+     * @return Pes
+     */
+    public function addBill(\AppBundle\Entity\Billing\Bill $bill)
+    {
+        $this->bills[] = $bill;
+
+        return $this;
+    }
+    /**
+     * Remove bill
+     *
+     * @param \AppBundle\Entity\Billing\Bill $bill
+     */
+    public function removeBill(\AppBundle\Entity\Billing\Bill $bill)
+    {
+        $this->bills->removeElement($bill);
+    }
+    /**
+     * Get bills
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBills()
+    {
+        return $this->bills;
+    }
+    /**
+     * Set samplingDate
+     *
+     * @param \DateTime $samplingDate
+     *
+     * @return Pes
+     */
+    public function setSamplingDate($samplingDate)
+    {
+        $this->samplingDate = $samplingDate;
+
+        return $this;
+    }
+    /**
+     * Get samplingDate
+     *
+     * @return \DateTime
+     */
+    public function getSamplingDate()
+    {
+        return $this->samplingDate;
+    }
+}

+ 73 - 0
old/Entity/Billing/SddTeneur.php

@@ -0,0 +1,73 @@
+<?php
+declare(strict_types=1);
+
+namespace AppBundle\Entity\Billing;
+
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+
+/**
+ * Classe ... qui ...
+ */
+#[ORM\Entity]
+class SddTeneur
+{
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['sddteneur_reference'])]
+    private $id;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['sddteneur_reference'])]
+    private $codique;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['sddteneur_reference'])]
+    private $libelle;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['sddteneur_reference'])]
+    private $iban;
+    /**
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * @return string
+     */
+    public function getCodique()
+    {
+        return $this->codique;
+    }
+    /**
+     * @return string
+     */
+    public function getLibelle()
+    {
+        return $this->libelle;
+    }
+    /**
+     * @return string
+     */
+    public function getIban()
+    {
+        return $this->iban;
+    }
+}

+ 528 - 0
old/Entity/Booking/AbstractBooking.php

@@ -0,0 +1,528 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Core\Tagg;
+use AppBundle\Entity\Place\Place;
+use AppBundle\Entity\Place\Room;
+use AppBundle\Entity\Product\Equipment;
+use AppBundle\Entity\Traits\ActivityYearTrait;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Validator\Constraints as Assert;
+use Doctrine\Common\Collections\ArrayCollection;
+use Symfony\Component\Serializer\Annotation\Groups;
+
+use AppBundle\Annotation\DefaultField;
+use AppBundle\Entity\Person\Person;
+use AppBundle\Entity\Organization\Organization;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Données d'un évènement générique, classe de base des évènements
+ * Classe de base de @see Event, Course, EducationalProject, Examen, OrganizationHoliday, PersonHoliday
+ *
+ *
+ */
+#[ORM\Entity]
+#[ORM\Table(name: 'Booking')]
+#[ORM\Index(name: 'viewIndex', columns: ['discr', 'datetimeEnd', 'visibility', 'isCanceled'])]
+#[ORM\InheritanceType('SINGLE_TABLE')]
+#[ORM\DiscriminatorColumn(name: 'discr', type: 'string')]
+#[ORM\DiscriminatorMap(['event' => 'Event', 'course' => 'Course', 'educationalproject' => 'EducationalProject', 'examen' => 'Examen', 'organizationholiday' => 'OrganizationHoliday', 'personholiday' => 'PersonHoliday'])]
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\Booking\Repository\BookingRepository')]
+abstract class AbstractBooking implements IBooking
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    use ActivityYearTrait;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['booking', 'student_list', 'attendancebooking_list', 'examenconvocation_list', 'invitations_list', 'my_attendance_list', 'generate_attendance', 'access_details', 'presence_attendance', 'event_details', 'examen_details', 'course_details', 'educationalproject_details', 'edu_stu_courses', 'student_registration', 'planning_detail', 'booking_event', 'accesses_courseteacher_show', 'course_informations_edit', 'examen_informations_edit', 'educationalproject_informations_edit', 'booking_event_documents', 'accessholidays_list'])]
+    private $id;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 100, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['booking', 'attendancebooking_list_course', 'attendancebooking_list_educationalproject', 'attendancebooking_list_event', 'attendancebooking_list_examen', 'access_details_attendancebookings', 'access_details_attendancebookingsfiltered', 'invitations_list_event', 'my_attendance_list_course', 'my_attendance_list_educationalproject', 'my_attendance_list_event', 'my_attendance_list_examen', 'planning_list', 'generate_attendance', 'access_details_practicalcourses', 'presence_attendance', 'event_details', 'examen_details', 'course_details', 'educationalproject_details', 'edu_stu_courses_courses', 'student_registration_courses', 'planning_detail', 'booking_event', 'examenconvocation_list_examen', 'report_card_examenconvocations', 'report_card_attendancebookings', 'accesses_courseteacher_show_practicalcourses', 'course_informations_edit', 'examen_informations_edit', 'educationalproject_informations_edit', 'accessbilling_edit_billingeducationalprojectpayers', 'accesses_courseteacher_show_practicalcourses', 'education_input_list_access', 'activity_report', 'worksbyusers_db_work', 'access_attendance_detail_attendancebookings', 'accessholidays_list', 'build_bills_billlines'])]
+    private $name;
+    /**
+     * @var Organization
+     *
+     * @DefaultField
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Organization\Organization')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['booking'])]
+    private $organization;
+    /**
+     * @var ArrayCollection<Person>
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'practicalCourses')]
+    #[ORM\JoinTable(name: 'booking_organizer', joinColumns: [], inverseJoinColumns: [])]
+    #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]
+    #[ORM\JoinColumn(name: 'organizer_id', referencedColumnName: 'id')]
+    #[Groups(['booking_access', 'booking', 'planning_list', 'event_details', 'course_details', 'educationalproject_details', 'edu_stu_courses_courses', 'student_registration_courses', 'planning_detail', 'booking_event', 'course_informations_edit', 'educationalproject_informations_edit', 'booking_event', 'presence_attendance', 'education_input_list_access', 'worksbyusers_db_work', 'attendancebooking_list_course'])]
+    private $organizer;
+    /**
+     * @var string
+     */
+    #[Assert\Type(type: 'string')]
+    #[Groups(['booking', 'planning_list'])]
+    private $color;
+    /**
+     * @var boolean
+     */
+    #[Assert\Type(type: 'boolean')]
+    private $hasReplacement;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'datetime', nullable: true)]
+    #[Assert\DateTime]
+    #[Groups(['booking', 'examenconvocation_list_examen', 'planning_list', 'generate_attendance', 'report_card_examenconvocations', 'access_details_practicalcourses', 'event_details', 'examen_details', 'course_details', 'educationalproject_details', 'edu_stu_courses_courses', 'student_registration_courses', 'planning_detail', 'booking_event', 'accesses_courseteacher_show_practicalcourses', 'course_informations_edit', 'examen_informations_edit', 'educationalproject_informations_edit', 'activity_report', 'education_input_list_access', 'accessholidays_list'])]
+    private $datetimeStart;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'datetime', nullable: true)]
+    #[Assert\DateTime]
+    #[Groups(['booking', 'planning_list', 'generate_attendance', 'access_details_practicalcourses', 'event_details', 'examen_details', 'course_details', 'educationalproject_details', 'edu_stu_courses_courses', 'student_registration_courses', 'planning_detail', 'booking_event', 'examenconvocation_list_examen', 'accesses_courseteacher_show_practicalcourses', 'activity_report', 'course_informations_edit', 'examen_informations_edit', 'educationalproject_informations_edit', 'accessholidays_list'])]
+    private $datetimeEnd;
+    /**
+     * @var ArrayCollection<IBookingRecur>
+     * !!!! Please define the ORM\OneToMany to the child class !!!
+     * ORM\OneToMany(targetEntity="Xxxx", mappedBy="event", cascade={"persist"}, orphanRemoval=true)
+     */
+    #[Assert\Valid]
+    #[Groups(['booking_recur', 'planning_list', 'planning_detail', 'booking_event', 'educationalproject_informations_edit', 'accesses_courseteacher_show_practicalcourses', 'student_list_courses'])]
+    protected $eventRecur;
+    /**
+     * @var string A short description of the item.
+     *
+     * @Iri("https://schema.org/description")
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['booking', 'event_details', 'course_details', 'educationalproject_details', 'edu_stu_courses_courses', 'student_registration_courses', 'booking_event', 'planning_detail', 'course_informations_edit', 'examen_informations_edit', 'examen_details', 'educationalproject_informations_edit', 'planning_detail', 'activity_report'])]
+    private $description;
+    /**
+     * @var Place
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Place\Place')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['booking', 'examenconvocation_list_examen', 'planning_list', 'event_details', 'examen_details', 'course_details', 'educationalproject_details', 'edu_stu_courses_courses', 'student_registration_courses', 'invitations_list_event', 'planning_detail', 'booking_event', 'course_informations_edit', 'course_informations_edit', 'examen_informations_edit', 'educationalproject_informations_edit', 'activity_report'])]
+    private $place;
+    /**
+     * @var Room
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Place\Room')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['booking', 'examenconvocation_list_examen', 'planning_list', 'examen_details', 'course_details', 'educationalproject_details', 'edu_stu_courses_courses', 'student_registration_courses', 'planning_detail', 'course_informations_edit', 'examen_informations_edit', 'educationalproject_informations_edit', 'booking_event', 'event_details'])]
+    private $room;
+    /**
+     * @var ArrayCollection<Equipment>
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Product\Equipment')]
+    #[ORM\JoinTable(name: 'booking_equipment', joinColumns: [], inverseJoinColumns: [])]
+    #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]
+    #[ORM\JoinColumn(name: 'equipment_id', referencedColumnName: 'id')]
+    #[Groups(['booking_equipment', 'event_details', 'course_details', 'planning_detail', 'examen_details', 'educationalproject_details', 'edu_stu_courses_courses', 'student_registration_courses', 'booking_event'])]
+    private $equipments;
+    /**
+     * @var ArrayCollection<Tagg>
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\Tagg', cascade: ['persist'], inversedBy: 'bookings')]
+    #[Assert\Valid]
+    #[ORM\JoinTable(name: 'tag_booking', joinColumns: [], inverseJoinColumns: [])]
+    #[ORM\JoinColumn(name: 'booking_id', referencedColumnName: 'id')]
+    #[ORM\JoinColumn(name: 'tag_id', referencedColumnName: 'id')]
+    #[Groups(['booking_tags', 'manage_tags', 'booking_event', 'event_details', 'course_informations_edit', 'course_details', 'educationalproject_informations_edit', 'educationalproject_details', 'examen_informations_edit', 'examen_details', 'planning_list'])]
+    private $tags;
+    /**
+     * The constructor
+     */
+    public function __construct() {
+        $this->eventRecur = new ArrayCollection();
+        $this->organizer = new ArrayCollection();
+        $this->equipments = new ArrayCollection();
+        $this->tags = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Sets name.
+     * 
+     * @param string $name
+     * 
+     * @return $this
+     */
+    public function setName($name)
+    {
+        $this->name = $name;
+
+        return $this;
+    }
+    /**
+     * Gets name.
+     * 
+     * @return string
+     */
+    public function getName()
+    {
+        return $this->name;
+    }
+    /**
+     * Sets color.
+     *
+     * @param string $color
+     *
+     * @return $this
+     */
+    public function setColor($color)
+    {
+        $this->color = $color;
+
+        return $this;
+    }
+    /**
+     * Gets color.
+     *
+     * @return string
+     */
+    public function getColor()
+    {
+        return $this->color;
+    }
+    /**
+     * Sets hasReplacement.
+     *
+     * @param boolean $hasReplacement
+     *
+     * @return $this
+     */
+    public function setHasReplacement($hasReplacement)
+    {
+        $this->hasReplacement = $hasReplacement;
+
+        return $this;
+    }
+    /**
+     * Gets hasReplacement.
+     *
+     * @return boolean
+     */
+    public function getHasReplacement()
+    {
+        return $this->hasReplacement;
+    }
+    /**
+     * Sets organization.
+     * 
+     * @param Organization $organization
+     * 
+     * @return $this
+     */
+    public function setOrganization(Organization $organization = null)
+    {
+        $this->organization = $organization;
+
+        return $this;
+    }
+    /**
+     * Gets organization.
+     * 
+     * @return Organization
+     */
+    public function getOrganization()
+    {
+        return $this->organization;
+    }
+    /**
+     * Adds organizer.
+     *
+     * @param Access $organizer
+     *
+     * @return $this
+     */
+    public function addOrganizer(Access $organizer)
+    {
+        $this->organizer[] = $organizer;
+
+        return $this;
+    }
+    /**
+     * Removes organizer.
+     *
+     * @param Access $organizer
+     *
+     * @return $this
+     */
+    public function removeOrganizer(Access $organizer)
+    {
+        $this->organizer->removeElement($organizer);
+
+        return $this;
+    }
+    /**
+     * Gets organizer.
+     *
+     * @return ArrayCollection<Access>
+     */
+    public function getOrganizer()
+    {
+        return $this->organizer;
+    }
+    /**
+     * Sets datetimeStart.
+     * 
+     * @param \DateTime $datetimeStart
+     * 
+     * @return $this
+     */
+    public function setDatetimeStart(\DateTime $datetimeStart = null)
+    {
+        $this->datetimeStart = $datetimeStart;
+
+        return $this;
+    }
+    /**
+     * Gets datetimeStart.
+     * 
+     * @return \DateTime
+     */
+    public function getDatetimeStart()
+    {
+        return $this->datetimeStart;
+    }
+    /**
+     * Sets datetimeEnd.
+     * 
+     * @param \DateTime $datetimeEnd
+     * 
+     * @return $this
+     */
+    public function setDatetimeEnd(\DateTime $datetimeEnd = null)
+    {
+        $this->datetimeEnd = $datetimeEnd;
+
+        return $this;
+    }
+    /**
+     * Gets datetimeEnd.
+     * 
+     * @return \DateTime
+     */
+    public function getDatetimeEnd()
+    {
+        return $this->datetimeEnd;
+    }
+    /**
+     * Add eventRecur
+     *
+     * @param IBookingRecur $eventRecur
+     *
+     * @return $this
+     */
+    public function addEventRecur(IBookingRecur $eventRecur)
+    {
+        $eventRecur->setEvent($this);
+        $this->eventRecur->add($eventRecur);
+
+        return $this;
+    }
+    /**
+     * Remove eventRecur
+     *
+     * @param IBookingRecur $eventRecur
+     */
+    public function removeEventRecur(IBookingRecur $eventRecur)
+    {        
+        $eventRecur->setEvent(null);
+        $this->eventRecur->removeElement($eventRecur);
+    }
+    /**
+     * Remove eventRecur
+     *
+     * @param IBookingRecur $eventRecur
+     */
+    public function resetEventRecur()
+    {
+        foreach($this->getEventRecur() as $eventRecur){
+            $eventRecur->setEvent(null);
+            $this->eventRecur->removeElement($eventRecur);
+        }
+        $this->eventRecur->clear();
+    }
+    /**
+     * Get eventRecur
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getEventRecur()
+    {
+        return $this->eventRecur;
+    }
+    /**
+     * Set description
+     *
+     * @param string $description
+     *
+     * @return AbstractBooking
+     */
+    public function setDescription($description)
+    {
+        $this->description = $description;
+
+        return $this;
+    }
+    /**
+     * Get description
+     *
+     * @return string
+     */
+    public function getDescription()
+    {
+        return $this->description;
+    }
+    /**
+     * Set place
+     *
+     * @param \AppBundle\Entity\Place\Place $place
+     *
+     * @return AbstractBooking
+     */
+    public function setPlace(\AppBundle\Entity\Place\Place $place = null)
+    {
+        $this->place = $place;
+
+        return $this;
+    }
+    /**
+     * Get place
+     *
+     * @return \AppBundle\Entity\Place\Place
+     */
+    public function getPlace()
+    {
+        return $this->place;
+    }
+    /**
+     * Set room
+     *
+     * @param \AppBundle\Entity\Place\Room $room
+     *
+     * @return AbstractBooking
+     */
+    public function setRoom(\AppBundle\Entity\Place\Room $room = null)
+    {
+        $this->room = $room;
+
+        return $this;
+    }
+    /**
+     * Get room
+     *
+     * @return \AppBundle\Entity\Place\Room
+     */
+    public function getRoom()
+    {
+        return $this->room;
+    }
+    /**
+     * {@inheritdoc}
+     */
+    public function getParticipants() {
+        throw new \Exception('This method must be implemented by children');
+    }
+    /**
+     * Add equipment
+     *
+     * @param \AppBundle\Entity\Product\Equipment $equipment
+     *
+     * @return AbstractBooking
+     */
+    public function addEquipment(\AppBundle\Entity\Product\Equipment $equipment)
+    {
+        $this->equipments[] = $equipment;
+
+        return $this;
+    }
+    /**
+     * Remove equipment
+     *
+     * @param \AppBundle\Entity\Product\Equipment $equipment
+     */
+    public function removeEquipment(\AppBundle\Entity\Product\Equipment $equipment)
+    {
+        $this->equipments->removeElement($equipment);
+    }
+    /**
+     * Get equipments
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getEquipments()
+    {
+        return $this->equipments;
+    }
+    /**
+     * Add tag
+     *
+     * @param \AppBundle\Entity\Core\Tagg $tag
+     *
+     * @return AbstractBooking
+     */
+    public function addTag(\AppBundle\Entity\Core\Tagg $tag)
+    {
+        $this->tags[] = $tag;
+
+        return $this;
+    }
+    /**
+     * Remove tag
+     *
+     * @param \AppBundle\Entity\Core\Tagg $tag
+     */
+    public function removeTag(\AppBundle\Entity\Core\Tagg $tag)
+    {
+        $this->tags->removeElement($tag);
+    }
+    /**
+     * Get tags
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getTags()
+    {
+        return $this->tags;
+    }
+}

+ 203 - 0
old/Entity/Booking/AbstractBookingRecur.php

@@ -0,0 +1,203 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Données de récurrence d'un évènement, classe de base des récurrences d'évènements
+ * @see EventRecur, CourseRecur, EducationalProjectRecur, ExamenRecur, OrganizationHolidayRecur, PersonHolidayRecur
+ */
+#[ORM\Entity]
+#[ORM\InheritanceType('SINGLE_TABLE')]
+#[ORM\Table(name: 'BookingRecur')]
+#[ORM\DiscriminatorColumn(name: 'discr', type: 'string')]
+#[ORM\DiscriminatorMap(['event' => 'EventRecur', 'course' => 'CourseRecur', 'educationalproject' => 'EducationalProjectRecur', 'examen' => 'ExamenRecur', 'organizationholiday' => 'OrganizationHolidayRecur', 'personholiday' => 'PersonHolidayRecur'])]
+abstract class AbstractBookingRecur implements IBookingRecur
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['bookingrecur', 'planning_list', 'access_details_practicalcourses', 'edu_stu_courses_courses', 'student_registration_courses', 'planning_detail', 'booking_event', 'course_informations_edit', 'examen_informations_edit', 'educationalproject_informations_edit', 'student_list_courses', 'accessholidays_list'])]
+    private $id;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'datetime', nullable: true)]
+    #[Assert\DateTime]
+    #[Groups(['bookingrecur', 'planning_list', 'access_details_practicalcourses', 'edu_stu_courses_courses', 'student_registration_courses', 'planning_detail_eventrecur', 'booking_event_eventrecur', 'accesses_courseteacher_show_practicalcourses', 'course_informations_edit_eventrecur', 'examen_informations_edit_eventrecur', 'educationalproject_informations_edit_eventrecur', 'student_list_courses'])]
+    private $datetimeStart;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'datetime', nullable: true)]
+    #[Assert\DateTime]
+    #[Groups(['bookingrecur', 'planning_list', 'access_details_practicalcourses', 'edu_stu_courses_courses', 'student_registration_courses', 'planning_detail_eventrecur', 'booking_event_eventrecur', 'accesses_courseteacher_show_practicalcourses', 'course_informations_edit_eventrecur', 'examen_informations_edit_eventrecur', 'educationalproject_informations_edit_eventrecur', 'student_list_courses'])]
+    private $datetimeEnd;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text')]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Groups(['bookingrecur', 'planning_list', 'access_details_practicalcourses', 'edu_stu_courses_courses', 'student_registration_courses', 'planning_detail_eventrecur', 'booking_event_eventrecur', 'accesses_courseteacher_show_practicalcourses', 'course_informations_edit_eventrecur', 'examen_informations_edit_eventrecur', 'educationalproject_informations_edit_eventrecur', 'accessholidays_list_eventrecur'])]
+    private $rule;
+    /**
+     * @var IBooking
+     * !!!! Please define the ORM\ManyToOne to the child class !!!
+     * ORM\ManyToOne(targetEntity="Xxx", inversedBy="eventRecur")
+     */
+    #[Groups(['bookingrecur'])]
+    protected $event;
+    /**
+     *
+     * @var bool
+     */
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[ORM\Column(type: 'boolean', options: ['default' => true])]
+    #[Groups(['bookingrecur', 'booking_event_eventrecur', 'student_registration_courses', 'edu_stu_courses_courses', 'student_registration_courses', 'course_informations_edit_eventrecur', 'examen_informations_edit_eventrecur', 'educationalproject_informations_edit_eventrecur'])]
+    private $withoutHollidayAndBank = true;
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Sets datetimeStart.
+     * 
+     * @param \DateTime $datetimeStart
+     * 
+     * @return $this
+     */
+    public function setDatetimeStart(\DateTime $datetimeStart = null)
+    {
+        $this->datetimeStart = $datetimeStart;
+
+        return $this;
+    }
+    /**
+     * Gets datetimeStart.
+     * 
+     * @return \DateTime
+     */
+    public function getDatetimeStart()
+    {
+        return $this->datetimeStart;
+    }
+    /**
+     * Sets datetimeEnd.
+     * 
+     * @param \DateTime $datetimeEnd
+     * 
+     * @return $this
+     */
+    public function setDatetimeEnd(\DateTime $datetimeEnd = null)
+    {
+        $this->datetimeEnd = $datetimeEnd;
+
+        return $this;
+    }
+    /**
+     * Gets datetimeEnd.
+     * 
+     * @return \DateTime
+     */
+    public function getDatetimeEnd()
+    {
+        return $this->datetimeEnd;
+    }
+    /**
+     * Sets rule.
+     *
+     * @param string $rule
+     *
+     * @return $this
+     */
+    public function setRule($rule)
+    {
+        $this->rule = $rule;
+
+        return $this;
+    }
+    /**
+     * Gets rule.
+     *
+     * @return string
+     */
+    public function getRule()
+    {
+        return $this->rule;
+    }
+    /**
+     * Sets event.
+     *
+     * @param IBooking $event
+     *
+     * @return $this
+     */
+    public function setEvent(IBooking $event = null)
+    {
+        $this->event = $event;
+
+        return $this;
+    }
+    /**
+     * Gets event.
+     *
+     * @return IBooking
+     */
+    public function getEvent()
+    {
+        return $this->event;
+    }
+    /**
+     *
+     * @return bool
+     */
+    public function getWithoutHollidayAndBank() {
+        return $this->withoutHollidayAndBank;
+    }
+    /**
+     *
+     * @param bool $withoutHollidayAndBank
+     * @return $this
+     */
+    public function setWithoutHollidayAndBank($withoutHollidayAndBank) {
+        $this->withoutHollidayAndBank = $withoutHollidayAndBank;
+        return $this;
+    }
+    /**
+     * NEED THIS FOR ELASTICA RECURR
+     * @return null
+     */
+    public function getDates(){
+        return null;
+    }
+}

+ 242 - 0
old/Entity/Booking/Attendance.php

@@ -0,0 +1,242 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use AppBundle\Annotation\DefaultField;
+use AppBundle\Entity\Traits\ActivityYearTrait;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Représente une période d'absence pour un Access dans une Organization
+ */
+#[ORM\Entity]
+class Attendance implements IAttendance
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    use ActivityYearTrait;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['attendance', 'attendance_list'])]
+    private $id;
+    /**
+     * @var Organization
+     *
+     * @DefaultField
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Organization\Organization', inversedBy: 'attendances')]
+    #[Groups(['attendance'])]
+    private $organization;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'attendances')]
+    #[Groups(['attendance', 'attendance_list'])]
+    private $access;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'attendanceReplacements')]
+    #[Groups(['attendance', 'attendance_list', 'planning_detail_attendancebooking'])]
+    private $replacement;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'datetime', nullable: true)]
+    #[Assert\DateTime]
+    #[Groups(['attendance', 'attendance_list'])]
+    private $datetimeStart;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'datetime', nullable: true)]
+    #[Assert\DateTime]
+    #[Groups(['attendance', 'attendance_list'])]
+    private $datetimeEnd;
+    /**
+     * var ArrayCollection<AttendanceBooking>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\AttendanceBooking', cascade: ['persist'], mappedBy: 'attendance', orphanRemoval: true)]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Groups(['attendance_attendancebooking'])]
+    private $attendanceBooking;
+    public function __construct()
+    {
+        $this->attendanceBooking = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Get id
+     *
+     * @return integer
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set datetimeStart
+     *
+     * @param \DateTime $datetimeStart
+     *
+     * @return Attendance
+     */
+    public function setDatetimeStart(\DateTime $datetimeStart = null)
+    {
+        $this->datetimeStart = $datetimeStart;
+
+        return $this;
+    }
+    /**
+     * Get datetimeStart
+     *
+     * @return \DateTime
+     */
+    public function getDatetimeStart()
+    {
+        return $this->datetimeStart;
+    }
+    /**
+     * Set datetimeEnd
+     *
+     * @param \DateTime $datetimeEnd
+     *
+     * @return Attendance
+     */
+    public function setDatetimeEnd(\DateTime $datetimeEnd = null)
+    {
+        $this->datetimeEnd = $datetimeEnd;
+
+        return $this;
+    }
+    /**
+     * Get datetimeEnd
+     *
+     * @return \DateTime
+     */
+    public function getDatetimeEnd()
+    {
+        return $this->datetimeEnd;
+    }
+    /**
+     * Set organization
+     *
+     * @param \AppBundle\Entity\Organization\Organization $organization
+     *
+     * @return Attendance
+     */
+    public function setOrganization(\AppBundle\Entity\Organization\Organization $organization = null)
+    {
+        $this->organization = $organization;
+
+        return $this;
+    }
+    /**
+     * Get organization
+     *
+     * @return \AppBundle\Entity\Organization\Organization
+     */
+    public function getOrganization()
+    {
+        return $this->organization;
+    }
+    /**
+     * Set access
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $access
+     *
+     * @return Attendance
+     */
+    public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access = null)
+    {
+        $this->access = $access;
+
+        return $this;
+    }
+    /**
+     * Get access
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getAccess()
+    {
+        return $this->access;
+    }
+    /**
+     * Set replacement
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $replacement
+     *
+     * @return Attendance
+     */
+    public function setReplacement(\AppBundle\Entity\AccessAndFunction\Access $replacement = null)
+    {
+        $this->replacement = $replacement;
+
+        return $this;
+    }
+    /**
+     * Get replacement
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getReplacement()
+    {
+        return $this->replacement;
+    }
+    /**
+     * Add attendanceBooking
+     *
+     * @param \AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking
+     *
+     * @return Attendance
+     */
+    public function addAttendanceBooking(\AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking)
+    {
+        $attendanceBooking->setAttendance($this);
+        $attendanceBooking->setAccess($this->getAccess());
+        $this->attendanceBooking[] = $attendanceBooking;
+
+        return $this;
+    }
+    /**
+     * Remove attendanceBooking
+     *
+     * @param \AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking
+     */
+    public function removeAttendanceBooking(\AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking)
+    {
+        $this->attendanceBooking->removeElement($attendanceBooking);
+    }
+    /**
+     * Get attendanceBooking
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getAttendanceBooking()
+    {
+        return $this->attendanceBooking;
+    }
+}

+ 342 - 0
old/Entity/Booking/AttendanceBooking.php

@@ -0,0 +1,342 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use AppBundle\Annotation\DefaultField;
+use AppBundle\Annotation\ExportSplitFields;
+use AppBundle\Entity\Traits\ActivityYearTrait;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Représente l'absence d'un Access à un type de Booking et à une date précise
+ */
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\Booking\Repository\AttendanceBookingRepository')]
+class AttendanceBooking implements IAttendance
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    use ActivityYearTrait;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['attendancebooking', 'access_details', 'attendancebooking_list', 'planning_list', 'report_card', 'presence_attendance', 'planning_detail', 'booking_event', 'course_details', 'examen_details', 'educationalproject_details', 'event_details', 'access_attendance_detail'])]
+    private $id;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'attendanceBookings')]
+    #[Groups(['attendancebooking', 'attendancebooking_list', 'planning_list', 'presence_attendance_attendancebooking', 'planning_detail_attendancebooking', 'booking_event_attendancebooking', 'course_details_attendancebooking', 'examen_details_attendancebooking', 'educationalproject_details_attendancebooking', 'event_details_attendancebooking'])]
+    private $access;
+    /**
+     * @var Attendance
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Booking\Attendance', inversedBy: 'attendanceBooking')]
+    #[Groups(['attendancebooking', 'access_details_attendancebookingsfiltered', 'planning_detail_attendancebooking', 'booking_event_attendancebooking'])]
+    private $attendance;
+    /**
+     * @var Course
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Booking\Course', inversedBy: 'attendanceBooking')]
+    #[Groups(['access_details_attendancebookingsfiltered', 'attendancebooking', 'attendancebooking_list', 'my_attendance_list', 'planning_list', 'report_card_attendancebookings', 'access_attendance_detail_attendancebookings'])]
+    private $course;
+    /**
+     * @var EducationalProject
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Booking\EducationalProject', inversedBy: 'attendanceBooking')]
+    #[Groups(['access_details_attendancebookingsfiltered', 'attendancebooking', 'attendancebooking_list', 'my_attendance_list', 'planning_list', 'report_card_attendancebookings', 'access_attendance_detail_attendancebookings'])]
+    private $educationalProject;
+    /**
+     * @var Event
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Booking\Event', inversedBy: 'attendanceBooking')]
+    #[Groups(['access_details_attendancebookingsfiltered', 'attendancebooking', 'attendancebooking_list', 'my_attendance_list', 'planning_list', 'report_card_attendancebookings', 'access_attendance_detail_attendancebookings'])]
+    private $event;
+    /**
+     * @var Examen
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Booking\Examen', inversedBy: 'attendanceBooking')]
+    #[Groups(['access_details_attendancebookingsfiltered', 'attendancebooking', 'attendancebooking_list', 'my_attendance_list', 'planning_list', 'report_card_attendancebookings', 'access_attendance_detail_attendancebookings'])]
+    private $examen;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'datetime', nullable: true)]
+    #[Assert\DateTime]
+    #[Groups(['access_details_attendancebookingsfiltered', 'attendancebooking', 'attendancebooking_list', 'my_attendance_list', 'planning_list', 'report_card_attendancebookings', 'presence_attendance_attendancebooking', 'planning_detail_attendancebooking', 'booking_event_attendancebooking', 'course_details_attendancebooking', 'examen_details_attendancebooking', 'educationalproject_details_attendancebooking', 'event_details_attendancebooking', 'access_attendance_detail_attendancebookings'])]
+    private $datetimeStart;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'datetime', nullable: true)]
+    #[Assert\DateTime]
+    #[Groups(['access_details_attendancebookingsfiltered', 'attendancebooking', 'attendancebooking_list', 'my_attendance_list', 'planning_list', 'presence_attendance_attendancebooking', 'booking_event_attendancebooking', 'report_card_attendancebookings', 'access_attendance_detail_attendancebookings'])]
+    private $datetimeEnd;
+    /**
+     * @var bool
+     */
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[ORM\Column(type: 'boolean', options: ['default' => true])]
+    #[Groups(['attendancebooking', 'access_details_attendancebookingsfiltered', 'attendancebooking_list', 'my_attendance_list', 'presence_attendance_attendancebooking', 'booking_event_attendancebooking', 'report_card_attendancebookings', 'access_attendance_detail_attendancebookings'])]
+    private $justify = false;
+    /**
+     * @var string
+     * @ExportSplitFields({"course.name','educationalProject.name','event.name','examen.name','course.organizer.person.fullNameTemplate"})
+     */
+    #[Groups(['template', 'attendancebooking_list'])]
+    private $reservationTemplate;
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Get id
+     *
+     * @return integer
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set datetimeStart
+     *
+     * @param \DateTime $datetimeStart
+     *
+     * @return AttendanceBooking
+     */
+    public function setDatetimeStart(\DateTime $datetimeStart = null)
+    {
+        $this->datetimeStart = $datetimeStart;
+
+        return $this;
+    }
+    /**
+     * Get datetimeStart
+     *
+     * @return \DateTime
+     */
+    public function getDatetimeStart()
+    {
+        return $this->datetimeStart;
+    }
+    /**
+     * Set datetimeEnd
+     *
+     * @param \DateTime $datetimeEnd
+     *
+     * @return AttendanceBooking
+     */
+    public function setDatetimeEnd(\DateTime $datetimeEnd = null)
+    {
+        $this->datetimeEnd = $datetimeEnd;
+
+        return $this;
+    }
+    /**
+     * Get datetimeEnd
+     *
+     * @return \DateTime
+     */
+    public function getDatetimeEnd()
+    {
+        return $this->datetimeEnd;
+    }
+    /**
+     * Set attendance
+     *
+     * @param \AppBundle\Entity\Booking\Attendance $attendance
+     *
+     * @return AttendanceBooking
+     */
+    public function setAttendance(\AppBundle\Entity\Booking\Attendance $attendance = null)
+    {
+        $this->attendance = $attendance;
+
+        return $this;
+    }
+    /**
+     * Get attendance
+     *
+     * @return \AppBundle\Entity\Booking\Attendance
+     */
+    public function getAttendance()
+    {
+        return $this->attendance;
+    }
+    /**
+     * Set access
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $access
+     *
+     * @return Attendance
+     */
+    public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access = null)
+    {
+        $this->access = $access;
+
+        return $this;
+    }
+    /**
+     * Get access
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getAccess()
+    {
+        return $this->access;
+    }
+    /**
+     * Set course
+     *
+     * @param \AppBundle\Entity\Booking\Course $course
+     *
+     * @return AttendanceBooking
+     */
+    public function setCourse(\AppBundle\Entity\Booking\Course $course = null)
+    {
+        $this->course = $course;
+
+        return $this;
+    }
+    /**
+     * Get course
+     *
+     * @return \AppBundle\Entity\Booking\Course
+     */
+    public function getCourse()
+    {
+        return $this->course;
+    }
+    /**
+     * Set educationalProject
+     *
+     * @param \AppBundle\Entity\Booking\EducationalProject $educationalProject
+     *
+     * @return AttendanceBooking
+     */
+    public function setEducationalProject(\AppBundle\Entity\Booking\EducationalProject $educationalProject = null)
+    {
+        $this->educationalProject = $educationalProject;
+
+        return $this;
+    }
+    /**
+     * Get educationalProject
+     *
+     * @return \AppBundle\Entity\Booking\EducationalProject
+     */
+    public function getEducationalProject()
+    {
+        return $this->educationalProject;
+    }
+    /**
+     * Set event
+     *
+     * @param \AppBundle\Entity\Booking\Event $event
+     *
+     * @return AttendanceBooking
+     */
+    public function setEvent(\AppBundle\Entity\Booking\Event $event = null)
+    {
+        $this->event = $event;
+
+        return $this;
+    }
+    /**
+     * Get event
+     *
+     * @return \AppBundle\Entity\Booking\Event
+     */
+    public function getEvent()
+    {
+        return $this->event;
+    }
+    /**
+     * Set examen
+     *
+     * @param \AppBundle\Entity\Booking\Examen $examen
+     *
+     * @return AttendanceBooking
+     */
+    public function setExamen(\AppBundle\Entity\Booking\Examen $examen = null)
+    {
+        $this->examen = $examen;
+
+        return $this;
+    }
+    /**
+     * Get examen
+     *
+     * @return \AppBundle\Entity\Booking\Examen
+     */
+    public function getExamen()
+    {
+        return $this->examen;
+    }
+    /**
+     * Set justify
+     *
+     * @param boolean $justify
+     *
+     * @return AttendanceBooking
+     */
+    public function setJustify($justify)
+    {
+        $this->justify = $justify;
+
+        return $this;
+    }
+    /**
+     * Get justify
+     *
+     * @return boolean
+     */
+    public function getJustify()
+    {
+        return $this->justify;
+    }
+    /**
+     * Gets full label.
+     *
+     * @return array
+     */
+    public function getReservationTemplate()
+    {
+
+        $fullLabelTemplate = [];
+
+        if(!empty($this->getCourse())){
+            $fullLabelTemplate[] = $this->getCourse()->getName();
+            $fullLabelTemplate[] = $this->getCourse()->getOrganizersTemplate();
+        }
+        if(!empty($this->getEducationalProject())){
+            $fullLabelTemplate[] = $this->getEducationalProject()->getName();
+        }
+        if(!empty($this->getEvent())){
+            $fullLabelTemplate[] = $this->getEvent()->getName();
+        }
+        if(!empty($this->getExamen())){
+            $fullLabelTemplate[] = $this->getExamen()->getName();
+        }
+
+        return $fullLabelTemplate;
+    }
+}

+ 224 - 0
old/Entity/Booking/CalendarSynchro.php

@@ -0,0 +1,224 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use AppBundle\Annotation\DefaultField;
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Traits\ActivityYearTrait;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\Booking\Repository\CalendarSynchroRepository')]
+class CalendarSynchro
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['calendarsynchro'])]
+    private $id;
+    /**
+     * @var Access
+     */
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'calendarSynchro', cascade: ['persist'], fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: true, onDelete: 'CASCADE')]
+    #[Groups(['calendarsynchro'])]
+    private $access;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: false)]
+    #[Groups(['calendarsynchro'])]
+    protected $hash;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'datetime', nullable: true)]
+    #[Assert\DateTime]
+    #[Groups(['calendarsynchro'])]
+    private $datetimeStart;
+    #[ORM\OneToOne(targetEntity: 'AppBundle\Entity\Core\File', inversedBy: 'calendarSynchro', cascade: ['persist'], fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: true, onDelete: 'CASCADE')]
+    #[Groups(['calendarsynchro'])]
+    private $file;
+    /**
+     * @var array
+     *
+     *
+     */
+    #[ORM\Column(type: 'json_array', nullable: true)]
+    protected $types;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['calendarsynchro'])]
+    private $eventsHaveChanged = false;
+    public function __construct()
+    {
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Get id
+     *
+     * @return integer
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set datetimeStart
+     *
+     * @param \DateTime $datetimeStart
+     *
+     * @return CalendarSynchro
+     */
+    public function setDatetimeStart($datetimeStart)
+    {
+        $this->datetimeStart = $datetimeStart;
+
+        return $this;
+    }
+    /**
+     * Get datetimeStart
+     *
+     * @return \DateTime
+     */
+    public function getDatetimeStart()
+    {
+        return $this->datetimeStart;
+    }
+    /**
+     * Set access
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $access
+     *
+     * @return CalendarSynchro
+     */
+    public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access = null)
+    {
+        $this->access = $access;
+
+        return $this;
+    }
+    /**
+     * Get access
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getAccess()
+    {
+        return $this->access;
+    }
+    /**
+     * Set hash
+     *
+     * @param string $hash
+     *
+     * @return CalendarSynchro
+     */
+    public function setHash($hash)
+    {
+        $this->hash = $hash;
+
+        return $this;
+    }
+    /**
+     * Get hash
+     *
+     * @return string
+     */
+    public function getHash()
+    {
+        return $this->hash;
+    }
+    /**
+     * Set file
+     *
+     * @param \AppBundle\Entity\Core\File $file
+     *
+     * @return CalendarSynchro
+     */
+    public function setFile(\AppBundle\Entity\Core\File $file = null)
+    {
+        $this->file = $file;
+
+        return $this;
+    }
+    /**
+     * Get file
+     *
+     * @return \AppBundle\Entity\Core\File
+     */
+    public function getFile()
+    {
+        return $this->file;
+    }
+    /**
+     * Set eventsHaveChanged
+     *
+     * @param boolean $eventsHaveChanged
+     *
+     * @return CalendarSynchro
+     */
+    public function setEventsHaveChanged($eventsHaveChanged)
+    {
+        $this->eventsHaveChanged = $eventsHaveChanged;
+
+        return $this;
+    }
+    /**
+     * Get eventsHaveChanged
+     *
+     * @return boolean
+     */
+    public function getEventsHaveChanged()
+    {
+        return $this->eventsHaveChanged;
+    }
+    /**
+     * Set types
+     *
+     * @param array $types
+     *
+     * @return CalendarSynchro
+     */
+    public function setTypes($types)
+    {
+        $this->types = $types;
+
+        return $this;
+    }
+    /**
+     * Get types
+     *
+     * @return array
+     */
+    public function getTypes()
+    {
+        return $this->types;
+    }
+}

+ 540 - 0
old/Entity/Booking/Course.php

@@ -0,0 +1,540 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use AppBundle\Annotation\ExportSplitFields;
+use AppBundle\Enum\Education\PratiqueEnum;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Recurr\Rule;
+use Recurr\Weekday;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Validator\Constraints\Booking as OpentalentEventAssert;
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Education\Education;
+use AppBundle\Entity\Education\EducationCurriculum;
+/**
+ * Cours
+ *
+ * @Iri("http://schema.org/Cours")
+ * @OpentalentEventAssert\Course()
+ */
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\Booking\Repository\CourseRepository')]
+class Course extends AbstractBooking
+{
+    /**
+     * @var ArrayCollection<CourseRecur>
+     *     "course",
+     *     "course_bookingrecur",
+     *     "planning_list",
+     *     "access_details_practicalcourses",
+     *     "edu_stu_courses_courses",
+     *     "student_registration_courses",
+     *     "planning_detail",
+     *     "course_details",
+     *     "course_informations_edit"
+     * })
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'CourseRecur', mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['bookingrecur', 'course', 'course_bookingrecur', 'planning_list', 'access_details_practicalcourses', 'edu_stu_courses_courses', 'student_registration_courses', 'planning_detail', 'course_details', 'course_informations_edit'])]
+    protected $eventRecur;
+    /**
+     * @var ArrayCollection<Course>
+     */
+    #[ORM\OneToMany(targetEntity: 'Course', mappedBy: 'parent', orphanRemoval: true)]
+    #[Groups(['course_timeline'])]
+    private $timeline;
+    /**
+     * @var \AppBundle\Entity\Booking\Course
+     */
+    #[ORM\ManyToOne(targetEntity: 'Course', inversedBy: 'timeline')]
+    #[Groups(['course'])]
+    private $parent;
+    /**
+     * @var string
+     */
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Booking\CourseTimelineTypeEnum', 'toArray'], multiple: false, min: 1)]
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Groups(['course'])]
+    private $type;
+    /**
+     * @var string
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Education\Education')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['course', 'planning_list', 'attendancebooking_list_course', 'generate_attendance', 'presence_attendance', 'course_details', 'edu_stu_courses_courses', 'student_registration_courses', 'course_informations_edit', 'planning_detail', 'student_registration_courses', 'education_input_list_access', 'worksbyusers_db_work', 'access_attendance_detail_attendancebookings', 'education_student_next_year_access'])]
+    private $education;
+    /**
+     * @var ArrayCollection<EducationCurriculum>
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Education\EducationCurriculum')]
+    #[Groups(['course', 'course_educationcurriculum', 'planning_list', 'planning_detail', 'attendancebooking_list_course', 'generate_attendance', 'access_details_practicalcourses', 'presence_attendance', 'course_details', 'edu_stu_courses_courses', 'student_registration_courses', 'worksbyusers_db_work', 'accesses_courseteacher_show_practicalcourses', 'course_informations_edit', 'education_input_list_access'])]
+    private $educationCurriculum;
+    /**
+     * @var ArrayCollection<Access>
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'courses')]
+    #[ORM\JoinTable(name: 'course_student', joinColumns: [], inverseJoinColumns: [])]
+    #[ORM\JoinColumn(name: 'course_id', referencedColumnName: 'id')]
+    #[ORM\JoinColumn(name: 'student_id', referencedColumnName: 'id')]
+    #[Groups(['course_access', 'access_details_practicalcourses', 'presence_attendance', 'course_details', 'edu_stu_courses_courses', 'student_registration_courses', 'planning_detail', 'course_informations_edit'])]
+    private $students;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['course', 'planning_list', 'planning_detail', 'education_input_list_access'])]
+    private $isCanceled = false;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['course', 'planning_detail'])]
+    private $isDuplicate = false;
+    /**
+     * var ArrayCollection<AttendanceBooking>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\AttendanceBooking', cascade: ['persist'], mappedBy: 'course', orphanRemoval: true)]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Groups(['course_attendancebooking', 'planning_list', 'presence_attendance', 'student_registration_courses', 'planning_detail', 'course_details'])]
+    private $attendanceBooking;
+    /**
+     * @var string
+     * @ExportSplitFields({"name","education.educationCategory.label","educationComplementTemplate","educationCurricullumsTemplate","timeTemplate","organizersTemplate","place.name","room.name"})
+     */
+    #[Groups(['student_list_coursesfiltered', 'education_student_next_year_access'])]
+    private $fullLabelTemplate;
+    /**
+     * @var string
+     */
+    #[Groups(['template'])]
+    private $timeTemplate;
+    /**
+     * @var string
+     */
+    #[Groups(['template'])]
+    private $educationComplementTemplate;
+    /**
+     * @var string
+     */
+    #[Groups(['template'])]
+    private $educationCurricullumsTemplate;
+    /**
+     * @var string
+     */
+    #[Groups(['template'])]
+    private $organizersTemplate;
+    /**
+     * @var string
+     */
+    #[Groups(['planning_list'])]
+    private $onlyOneStudentName;
+    /**
+     * @var ArrayCollection<EventUser>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'Work', mappedBy: 'course', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['course'])]
+    private $work;
+    public function __construct()
+    {
+        parent::__construct();
+        $this->eventRecur = new ArrayCollection();
+        $this->educationCurriculum = new ArrayCollection();
+        $this->students = new ArrayCollection();
+        $this->timeline = new ArrayCollection();
+        $this->attendanceBooking = new ArrayCollection();
+    }
+    /**
+     * Adds timeline.
+     * 
+     * @param Course $course
+     *       
+     * @return $this
+     */
+    public function addTimeline(Course $course) {
+        $this->timeline[] = $course;
+    }
+    /**
+     * Removes timeline.
+     * 
+     * @param Course $course
+     * 
+     * @return $this
+     */
+    public function removeTimeline(Course $course) {
+        $key = array_search($course, $this->timeline, true);
+        if (false !== $key) {
+            unset($this->timeline[$key]);
+        }
+
+        return $this;        
+    }
+    /**
+     * Gets timeline.
+     * 
+     * @return ArrayCollection<Course>
+     */
+    public function getTimeline() {
+        return $this->timeline;
+    }
+    /**
+     * Get parent
+     * 
+     * @return Course
+     */
+    public function getParent() {
+        return $this->parent;
+    }
+    /**
+     * Set parent
+     * 
+     * @param Course $parent
+     * @return $this
+     */
+    public function setParent(Course $parent=null) {
+        $this->parent = $parent;
+        
+        return $this;
+    }
+    /**
+     * Get type
+     * 
+     * @return string
+     */
+    public function getType() {
+        return $this->type;
+    }
+    /**
+     * Set type
+     * 
+     * @param string $type
+     * @return $this
+     */
+    public function setType($type) {
+        $this->type = $type;
+        
+        return $this;
+    }
+    /**
+     * Sets isCanceled.
+     * 
+     * @param bool $isCanceled
+     * 
+     * @return $this
+     */
+    public function setIsCanceled($isCanceled)
+    {
+        $this->isCanceled = $isCanceled;
+
+        return $this;
+    }
+    /**
+     * Gets isCanceled.
+     * 
+     * @return bool
+     */
+    public function getIsCanceled()
+    {
+        return $this->isCanceled;
+    }
+    /**
+     * Sets isDuplicate.
+     *
+     * @param bool $isDuplicate
+     *
+     * @return $this
+     */
+    public function setIsDuplicate($isDuplicate)
+    {
+        $this->isDuplicate = $isDuplicate;
+
+        return $this;
+    }
+    /**
+     * Gets isDuplicate.
+     *
+     * @return bool
+     */
+    public function getIsDuplicate()
+    {
+        return $this->isDuplicate;
+    }
+    /**
+     * Set education
+     *
+     * @param Education $education
+     *
+     * @return Course
+     */
+    public function setEducation(Education $education = null)
+    {
+        $this->education = $education;
+
+        return $this;
+    }
+    /**
+     * Get education
+     *
+     * @return Education
+     */
+    public function getEducation()
+    {
+        return $this->education;
+    }
+    /**
+     * Add educationCurriculum
+     *
+     * @param EducationCurriculum $educationCurriculum
+     *
+     * @return Course
+     */
+    public function addEducationCurriculum(EducationCurriculum $educationCurriculum)
+    {
+        $this->educationCurriculum[] = $educationCurriculum;
+
+        return $this;
+    }
+    /**
+     * Remove educationCurriculum
+     *
+     * @param EducationCurriculum $educationCurriculum
+     */
+    public function removeEducationCurriculum(EducationCurriculum $educationCurriculum)
+    {
+        $this->educationCurriculum->removeElement($educationCurriculum);
+    }
+    /**
+     * Get educationCurriculum
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getEducationCurriculum()
+    {
+        return $this->educationCurriculum;
+    }
+    /**
+     * Reset education curriculum
+     *
+     */
+    public function resetEducationCurriculum()
+    {
+        foreach($this->getEducationCurriculum() as $educationCurriculum){
+            $this->removeEducationCurriculum($educationCurriculum);
+        }
+        $this->educationCurriculum->clear();
+    }
+    /**
+     * Add student
+     *
+     * @param Access $student
+     *
+     * @return Course
+     */
+    public function addStudent(Access $student)
+    {
+        $this->students[] = $student;
+
+        return $this;
+    }
+    /**
+     * Remove student
+     *
+     * @param Access $student
+     */
+    public function removeStudent(Access $student)
+    {
+        $this->students->removeElement($student);
+    }
+    /**
+     * Get students
+     *
+     * @return ArrayCollection<Access>
+     */
+    public function getStudents()
+    {
+        return $this->students;
+    }
+    /**
+     * Add attendanceBooking
+     *
+     * @param \AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking
+     *
+     * @return AbstractBooking
+     */
+    public function addAttendanceBooking(\AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking)
+    {
+        $attendanceBooking->setCourse($this);
+        $this->attendanceBooking[] = $attendanceBooking;
+
+        return $this;
+    }
+    /**
+     * Remove attendanceBooking
+     *
+     * @param \AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking
+     */
+    public function removeAttendanceBooking(\AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking)
+    {
+        $this->attendanceBooking->removeElement($attendanceBooking);
+    }
+    /**
+     * Get attendanceBooking
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getAttendanceBooking()
+    {
+        return $this->attendanceBooking;
+    }
+    /**
+     * {@inheritdoc}
+     */
+    public function getParticipants() {
+        $participants = new ArrayCollection();
+        array_map(function (Access $a) use ($participants) { $participants->add($a->getPerson());}, $this->getStudents()->toArray());
+        return $participants;
+    }
+    /**
+     * @return array
+     */
+    public function getTimeTemplate(){
+        $dateTimeStart = $this->getDatetimeStart();
+        if(!empty($dateTimeStart)){
+            $days = [];
+            if(!empty($this->getEventRecur()) && !empty($this->getEventRecur()->get(0))){
+                $rule = $this->getEventRecur()->get(0)->getRule();
+                $rrule = new Rule($rule);
+                $string_days = [
+                    0 => 'Monday',
+                    1 => 'Tuesday',
+                    2 => 'Wednesday',
+                    3 => 'Thursday',
+                    4 => 'Friday',
+                    5 => 'Saturday',
+                    6 => 'Sunday'
+                ];
+                /** @var Weekday $weekDay */
+                foreach ($rrule->getByDayTransformedToWeekdays() as $weekDays){
+                    $days[] = $string_days[$weekDays->weekday];
+                }
+            }else{
+                $days[] = $dateTimeStart->format('l');
+            }
+
+            $timezone = 'Europe/Paris';
+            $dateTimeStart->setTimezone(new \DateTimeZone($timezone));
+            $time = [];
+            foreach ($days as $day){
+                $time[] = ['value' => $day , 'translate' => true];
+            }
+            $time[] = $dateTimeStart->format('à H:i');
+            return $time;
+        }else{
+            return [];
+        }
+    }
+    /**
+     * @return string
+     */
+    public function getEducationComplementTemplate(){
+        return $this->getEducation() ? $this->getEducation()->getEducationComplementTemplate() : '';
+    }
+    /**
+     * @return array
+     */
+    public function getEducationCurricullumsTemplate(){
+        $educationCurricullums = [];
+        foreach ($this->getEducationCurriculum() as $edc){
+            $educationCurricullums[] = ( $edc->getCycle() && $edc->getCycle()->getLabel() !== 'NO_CYCLE' ? $edc->getCycle()->getLabel() : '' );
+            $educationCurricullums[] = ['value' => $edc->getYear(), 'translate' => true];
+            $educationCurricullums[] = $edc->getLevel();
+            $educationCurricullums[] = ', ';
+        }
+
+        return $educationCurricullums;
+    }
+    /**
+     * @return string
+     */
+    public function getOrganizersTemplate(){
+        $organizers = [];
+        foreach($this->getOrganizer() as $organizer){
+            $organizers[] = $organizer->getPerson()->getFullNameTemplate();
+        }
+
+        return ' avec ' . implode(", ", $organizers);
+    }
+    /**
+     * Gets full label.
+     *
+     * @return array
+     */
+    public function getFullLabelTemplate()
+    {
+
+        if(is_null($this->getEducation())){
+            return [];
+        }
+
+        $fullLabelTemplate = [
+            $this->getName(),
+            $this->getEducation()->getEducationCategory()->getLabel(),
+            $this->getEducationComplementTemplate()
+        ];
+
+        $fullLabelTemplate = array_merge($fullLabelTemplate, $this->getEducationCurricullumsTemplate(),$this->getTimeTemplate(), [
+            $this->getOrganizersTemplate(),
+            $this->getRoom() ? $this->getRoom()->getName() : '',
+            $this->getPlace() ? $this->getPlace()->getName() : ''
+        ] );
+
+        return $fullLabelTemplate;
+    }
+    /**
+     * @return string
+     */
+    public function getOnlyOneStudentName()
+    {
+        return $this->onlyOneStudentName;
+    }
+    /**
+     * @param string $name
+     */
+    public function setOnlyOneStudentName($name)
+    {
+        $this->onlyOneStudentName = $name;
+    }
+    /**
+     * Add Work
+     *
+     * @param Work $work
+     *
+     * @return AbstractBooking
+     */
+    public function addWork(Work $work)
+    {
+        $work->setCourse($this);
+        $this->work[] = $work;
+
+        return $this;
+    }
+    /**
+     * Get work
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getWork()
+    {
+        return $this->work;
+    }
+}

+ 24 - 0
old/Entity/Booking/CourseRecur.php

@@ -0,0 +1,24 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+
+/**
+ * Cours récurrent
+ *
+ * @Iri("http://schema.org/CourseRecur")
+ */
+#[ORM\Entity]
+class CourseRecur extends AbstractBookingRecur
+{
+    /**
+     * @var Course
+     */
+    #[ORM\ManyToOne(targetEntity: 'Course', inversedBy: 'eventRecur')]
+    #[Groups(['bookingrecur', 'edu_stu_courses_courses', 'student_registration_courses', 'planning_detail', 'course_details'])]
+    protected $event;
+}

+ 668 - 0
old/Entity/Booking/EducationalProject.php

@@ -0,0 +1,668 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Billing\EducationalProjectIntangible;
+use AppBundle\Entity\Product\Equipment;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+
+use AppBundle\Validator\Constraints\Booking as OpentalentEvent;
+
+/**
+ * Prestation pédagogique
+ *
+ * @Iri("http://schema.org/EducationalProject")
+ * @OpentalentEvent\EducationnalProject()
+ */
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\Booking\Repository\EducationalProjectRepository')]
+class EducationalProject extends AbstractBooking
+{
+    /**
+     * @var ArrayCollection<EducationalProjectRecur>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'EducationalProjectRecur', mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['educationalproject_bookingrecur', 'planning_detail'])]
+    protected $eventRecur;
+    /**
+     * @var ArrayCollection<EducationalProject>
+     */
+    #[ORM\OneToMany(targetEntity: 'EducationalProject', mappedBy: 'parent', orphanRemoval: true)]
+    #[Groups(['educationalproject_timeline'])]
+    private $timeline;
+    /**
+     * @var \AppBundle\Entity\Booking\EducationalProject
+     */
+    #[ORM\ManyToOne(targetEntity: 'EducationalProject', inversedBy: 'timeline')]
+    #[Groups(['educationalproject'])]
+    private $parent;
+    /**
+     * @var string
+     */
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Booking\EducationalProjectTimelineTypeEnum', 'toArray'], multiple: false, min: 1)]
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Groups(['educationalproject'])]
+    private $type;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 35, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['educationalproject', 'planning_detail', 'educationalproject_details'])]
+    private $object;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'silentPartners')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['educationalproject', 'planning_detail', 'educationalproject_details'])]
+    private $silentPartner;
+    /**
+     * @var EducationalProjectPublic
+     */
+    #[ORM\ManyToOne(targetEntity: 'EducationalProjectPublic', inversedBy: 'educationalProjects')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['educationalproject', 'planning_detail', 'educationalproject_details'])]
+    private $public;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Groups(['educationalproject', 'planning_detail', 'educationalproject_details'])]
+    private $amount;
+    /**
+     * @var EducationalProjectAge
+     */
+    #[Assert\Valid]
+    #[ORM\OneToOne(targetEntity: 'EducationalProjectAge', cascade: ['persist'], orphanRemoval: true, fetch: 'EAGER')]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['educationalproject', 'educationalproject_details', 'planning_detail'])]
+    private $ageDistribution;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'operationalPartners')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['educationalproject', 'planning_detail', 'educationalproject_details'])]
+    private $operationalPartner;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access')]
+    #[ORM\JoinTable(name: 'educationalproject_financier')]
+    #[Groups(['educationalproject_access', 'planning_detail', 'educationalproject_details'])]
+    private $financiers;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Booking\EducationalProjectEstablishmentEnum', 'toArray'])]
+    #[Groups(['educationalproject', 'planning_detail', 'educationalproject_details'])]
+    private $establishment;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Booking\EducationalProjectSpecialClassEnum', 'toArray'])]
+    #[Groups(['educationalproject', 'planning_detail', 'educationalproject_details'])]
+    private $specialClass;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Booking\EducationalProjectEducationalDeviceEnum', 'toArray'])]
+    #[Groups(['educationalproject', 'planning_detail', 'educationalproject_details'])]
+    private $educationalDevice;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['educationalproject', 'planning_detail'])]
+    private $report;
+    /**
+     * @var ArrayCollection<File>
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\File')]
+    #[Groups(['educationalproject_file'])]
+    private $files;
+    /**
+     * @var ArrayCollection<EducationalProjectIntangible>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Billing\EducationalProjectIntangible', mappedBy: 'educationalProject', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['educationalprojects_educationalprojectintangible', 'planning_detail', 'educationalproject_details'])]
+    private $educationalProjectIntangibles;
+    /**
+     * @var ArrayCollection<EducationalProject>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Billing\EducationalProjectPayer', mappedBy: 'educationalProjectReceiver', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['educationalproject_educationalprojectpayer', 'planning_detail', 'educationalproject_details'])]
+    private $billingReceivers;
+    /**
+     * @var ArrayCollection<BillLine>
+     */
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Billing\BillLine', mappedBy: 'educationalProject', orphanRemoval: true)]
+    #[Groups(['educationalproject_billline', 'planning_detail'])]
+    private $billLines;
+    /**
+     * var ArrayCollection<AttendanceBooking>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\AttendanceBooking', cascade: ['persist'], mappedBy: 'educationalProject', orphanRemoval: true)]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Groups(['educationalproject_attendancebooking', 'educationalproject_details', 'planning_detail'])]
+    private $attendanceBooking;
+    public function __construct()
+    {
+        parent::__construct();
+        $this->files = new ArrayCollection();
+        $this->financiers = new ArrayCollection();
+        $this->educationalProjectIntangibles = new ArrayCollection();
+        $this->billingReceivers = new ArrayCollection();
+        $this->attendanceBooking = new ArrayCollection();
+    }
+    /**
+     * Sets object.
+     * 
+     * @param string $object
+     * 
+     * @return $this
+     */
+    public function setObject($object)
+    {
+        $this->object = $object;
+
+        return $this;
+    }
+    /**
+     * Gets object.
+     * 
+     * @return string
+     */
+    public function getObject()
+    {
+        return $this->object;
+    }
+    /**
+     * Sets public.
+     * 
+     * @param EducationalProjectPublic $educationalProjectPublic
+     * 
+     * @return $this
+     */
+    public function setPublic(EducationalProjectPublic $public = null)
+    {
+        $this->public = $public;
+
+        return $this;
+    }
+    /**
+     * Gets public.
+     * 
+     * @return EducationalProjectPublic
+     */
+    public function getPublic()
+    {
+        return $this->public;
+    }
+    /**
+     * Sets amount.
+     * 
+     * @param float $amount
+     * 
+     * @return $this
+     */
+    public function setAmount($amount)
+    {
+        $this->amount = floatval($amount);
+
+        return $this;
+    }
+    /**
+     * Gets amount.
+     * 
+     * @return float
+     */
+    public function getAmount()
+    {
+        return $this->amount;
+    }
+    /**
+     * Sets establishment.
+     * 
+     * @param string $establishment
+     * 
+     * @return $this
+     */
+    public function setEstablishment($establishment)
+    {
+        $this->establishment = $establishment;
+
+        return $this;
+    }
+    /**
+     * Gets establishment.
+     * 
+     * @return string
+     */
+    public function getEstablishment()
+    {
+        return $this->establishment;
+    }
+    /**
+     * Sets specialClass.
+     * 
+     * @param string $specialClass
+     * 
+     * @return $this
+     */
+    public function setSpecialClass($specialClass)
+    {
+        $this->specialClass = $specialClass;
+
+        return $this;
+    }
+    /**
+     * Gets specialClass.
+     * 
+     * @return string
+     */
+    public function getSpecialClass()
+    {
+        return $this->specialClass;
+    }
+    /**
+     * Sets educationalDevice.
+     * 
+     * @param string $educationalDevice
+     * 
+     * @return $this
+     */
+    public function setEducationalDevice($educationalDevice)
+    {
+        $this->educationalDevice = $educationalDevice;
+
+        return $this;
+    }
+    /**
+     * Gets educationalDevice.
+     * 
+     * @return string
+     */
+    public function getEducationalDevice()
+    {
+        return $this->educationalDevice;
+    }
+    /**
+     * Sets report.
+     * 
+     * @param string $report
+     * 
+     * @return $this
+     */
+    public function setReport($report)
+    {
+        $this->report = $report;
+
+        return $this;
+    }
+    /**
+     * Gets report.
+     * 
+     * @return string
+     */
+    public function getReport()
+    {
+        return $this->report;
+    }
+    /**
+     * Set ageDistribution
+     *
+     * @param \AppBundle\Entity\Booking\EducationalProjectAge $ageDistribution
+     *
+     * @return EducationalProject
+     */
+    public function setAgeDistribution(\AppBundle\Entity\Booking\EducationalProjectAge $ageDistribution = null)
+    {
+        $this->ageDistribution = $ageDistribution;
+
+        return $this;
+    }
+    /**
+     * Get ageDistribution
+     *
+     * @return \AppBundle\Entity\Booking\EducationalProjectAge
+     */
+    public function getAgeDistribution()
+    {
+        return $this->ageDistribution;
+    }
+    /**
+     * Add file
+     *
+     * @param \AppBundle\Entity\Core\File $file
+     *
+     * @return EducationalProject
+     */
+    public function addFile(\AppBundle\Entity\Core\File $file)
+    {
+        $this->files[] = $file;
+
+        return $this;
+    }
+    /**
+     * Remove file
+     *
+     * @param \AppBundle\Entity\Core\File $file
+     */
+    public function removeFile(\AppBundle\Entity\Core\File $file)
+    {
+        $this->files->removeElement($file);
+    }
+    /**
+     * Get files
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getFiles()
+    {
+        return $this->files;
+    }
+    /**
+     * Set silentPartner
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $silentPartner
+     *
+     * @return EducationalProject
+     */
+    public function setSilentPartner(\AppBundle\Entity\AccessAndFunction\Access $silentPartner = null)
+    {
+        $this->silentPartner = $silentPartner;
+
+        return $this;
+    }
+    /**
+     * Get silentPartner
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getSilentPartner()
+    {
+        return $this->silentPartner;
+    }
+    /**
+     * Set operationalPartner
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $operationalPartner
+     *
+     * @return EducationalProject
+     */
+    public function setOperationalPartner(\AppBundle\Entity\AccessAndFunction\Access $operationalPartner = null)
+    {
+        $this->operationalPartner = $operationalPartner;
+
+        return $this;
+    }
+    /**
+     * Get operationalPartner
+     *
+     * @return \AppBundle\Entity\AccessAndFunction\Access
+     */
+    public function getOperationalPartner()
+    {
+        return $this->operationalPartner;
+    }
+    /**
+     * Add financier
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $financier
+     *
+     * @return EducationalProject
+     */
+    public function addFinancier(\AppBundle\Entity\AccessAndFunction\Access $financier)
+    {
+        $this->financiers[] = $financier;
+
+        return $this;
+    }
+    /**
+     * Remove financier
+     *
+     * @param \AppBundle\Entity\AccessAndFunction\Access $financier
+     */
+    public function removeFinancier(\AppBundle\Entity\AccessAndFunction\Access $financier)
+    {
+        $this->financiers->removeElement($financier);
+    }
+    /**
+     * Get financiers
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getFinanciers()
+    {
+        return $this->financiers;
+    }
+    /**
+     * {@inheritdoc}
+     */
+    public function getParticipants() {
+        $participants = new ArrayCollection();        
+        return $participants;        
+    }
+    /**
+     * Set type
+     *
+     * @param string $type
+     *
+     * @return EducationalProject
+     */
+    public function setType($type)
+    {
+        $this->type = $type;
+
+        return $this;
+    }
+    /**
+     * Get type
+     *
+     * @return string
+     */
+    public function getType()
+    {
+        return $this->type;
+    }
+    /**
+     * Add timeline
+     *
+     * @param \AppBundle\Entity\Booking\EducationalProject $timeline
+     *
+     * @return EducationalProject
+     */
+    public function addTimeline(\AppBundle\Entity\Booking\EducationalProject $timeline)
+    {
+        $this->timeline[] = $timeline;
+
+        return $this;
+    }
+    /**
+     * Remove timeline
+     *
+     * @param \AppBundle\Entity\Booking\EducationalProject $timeline
+     */
+    public function removeTimeline(\AppBundle\Entity\Booking\EducationalProject $timeline)
+    {
+        $this->timeline->removeElement($timeline);
+    }
+    /**
+     * Get timeline
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getTimeline()
+    {
+        return $this->timeline;
+    }
+    /**
+     * Set parent
+     *
+     * @param \AppBundle\Entity\Booking\EducationalProject $parent
+     *
+     * @return EducationalProject
+     */
+    public function setParent(\AppBundle\Entity\Booking\EducationalProject $parent = null)
+    {
+        $this->parent = $parent;
+
+        return $this;
+    }
+    /**
+     * Get parent
+     *
+     * @return \AppBundle\Entity\Booking\EducationalProject
+     */
+    public function getParent()
+    {
+        return $this->parent;
+    }
+    /**
+     * Add educationalProjectIntangible
+     *
+     * @param \AppBundle\Entity\Billing\EducationalProjectIntangible $educationalProjectIntangible
+     *
+     * @return EducationalProject
+     */
+    public function addEducationalProjectIntangible(\AppBundle\Entity\Billing\EducationalProjectIntangible $educationalProjectIntangible)
+    {
+        $educationalProjectIntangible->setEducationalProject($this);
+        $this->educationalProjectIntangibles[] = $educationalProjectIntangible;
+
+        return $this;
+    }
+    /**
+     * Remove educationalProjectIntangible
+     *
+     * @param \AppBundle\Entity\Billing\EducationalProjectIntangible $educationalProjectIntangible
+     */
+    public function removeEducationalProjectIntangible(\AppBundle\Entity\Billing\EducationalProjectIntangible $educationalProjectIntangible)
+    {
+        $educationalProjectIntangible->setEducationalProject(null);
+        $this->educationalProjectIntangibles->removeElement($educationalProjectIntangible);
+    }
+    /**
+     * Get educationalProjectIntangibles
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getEducationalProjectIntangibles()
+    {
+        return $this->educationalProjectIntangibles;
+    }
+    /**
+     * Add billingReceiver
+     *
+     * @param \AppBundle\Entity\Billing\EducationalProjectPayer $billingReceiver
+     *
+     * @return EducationalProject
+     */
+    public function addBillingReceiver(\AppBundle\Entity\Billing\EducationalProjectPayer $billingReceiver)
+    {
+        $billingReceiver->setEducationalProjectReceiver($this);
+        $this->billingReceivers[] = $billingReceiver;
+
+        return $this;
+    }
+    /**
+     * Remove billingReceiver
+     *
+     * @param \AppBundle\Entity\Billing\EducationalProjectPayer $billingReceiver
+     */
+    public function removeBillingReceiver(\AppBundle\Entity\Billing\EducationalProjectPayer $billingReceiver)
+    {
+        $this->billingReceivers->removeElement($billingReceiver);
+    }
+    /**
+     * Get billingReceivers
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBillingReceivers()
+    {
+        return $this->billingReceivers;
+    }
+    /**
+     * Add billLine
+     *
+     * @param \AppBundle\Entity\Billing\BillLine $billLine
+     *
+     * @return EducationalProject
+     */
+    public function addBillLine(\AppBundle\Entity\Billing\BillLine $billLine)
+    {
+        $this->billLines[] = $billLine;
+
+        return $this;
+    }
+    /**
+     * Remove billLine
+     *
+     * @param \AppBundle\Entity\Billing\BillLine $billLine
+     */
+    public function removeBillLine(\AppBundle\Entity\Billing\BillLine $billLine)
+    {
+        $this->billLines->removeElement($billLine);
+    }
+    /**
+     * Get billLines
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getBillLines()
+    {
+        return $this->billLines;
+    }
+    /**
+     * Add attendanceBooking
+     *
+     * @param \AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking
+     *
+     * @return AbstractBooking
+     */
+    public function addAttendanceBooking(\AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking)
+    {
+        $attendanceBooking->setEducationalProject($this);
+        $this->attendanceBooking[] = $attendanceBooking;
+
+        return $this;
+    }
+    /**
+     * Remove attendanceBooking
+     *
+     * @param \AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking
+     */
+    public function removeAttendanceBooking(\AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking)
+    {
+        $this->attendanceBooking->removeElement($attendanceBooking);
+    }
+    /**
+     * Get attendanceBooking
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getAttendanceBooking()
+    {
+        return $this->attendanceBooking;
+    }
+}

+ 277 - 0
old/Entity/Booking/EducationalProjectAge.php

@@ -0,0 +1,277 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Répartition des âges dans une prestation pédagogique EducationnalProject
+ *
+ * @Iri("http://schema.org/EducationalProjectAge")
+ */
+#[ORM\Entity]
+class EducationalProjectAge
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['educationalprojectage', 'educationalproject_details'])]
+    private $id;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['educationalprojectage', 'educationalproject_details_agedistribution'])]
+    private $rep0to3;
+    /**
+     * @var int     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['educationalprojectage', 'educationalproject_details_agedistribution'])]
+    private $rep4to6;
+    /**
+     * @var int     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['educationalprojectage', 'educationalproject_details_agedistribution'])]
+    private $rep7to11;
+    /**
+     * @var int     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['educationalprojectage', 'educationalproject_details_agedistribution'])]
+    private $rep12to15;
+    /**
+     * @var int     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['educationalprojectage', 'educationalproject_details_agedistribution'])]
+    private $rep16to25;
+    /**
+     * @var int     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['educationalprojectage', 'educationalproject_details_agedistribution'])]
+    private $repAdult;
+    /**
+     * @var int     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['educationalprojectage', 'educationalproject_details_agedistribution'])]
+    private $repSenior;
+    /**
+     * @var int     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['educationalprojectage', 'educationalproject_details_agedistribution', 'planning_detail_educationalproject'])]
+    private $total;
+    /**
+     * Sets id.
+     * 
+     * @param int $id
+     * 
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     * 
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Sets rep0to3.
+     * 
+     * @param int $rep0to3
+     * 
+     * @return $this
+     */
+    public function setRep0to3($rep0to3)
+    {
+        $this->rep0to3 = $rep0to3;
+
+        return $this;
+    }
+    /**
+     * Gets rep0to3.
+     * 
+     * @return int
+     */
+    public function getRep0to3()
+    {
+        return $this->rep0to3;
+    }
+    /**
+     * Sets rep4to6.
+     * 
+     * @param int $rep4to6
+     * 
+     * @return $this
+     */
+    public function setRep4to6($rep4to6)
+    {
+        $this->rep4to6 = $rep4to6;
+
+        return $this;
+    }
+    /**
+     * Gets rep4to6.
+     * 
+     * @return int
+     */
+    public function getRep4to6()
+    {
+        return $this->rep4to6;
+    }
+    /**
+     * Sets rep7to11.
+     * 
+     * @param int $rep7to11
+     * 
+     * @return $this
+     */
+    public function setRep7to11($rep7to11)
+    {
+        $this->rep7to11 = $rep7to11;
+
+        return $this;
+    }
+    /**
+     * Gets rep7to11.
+     * 
+     * @return int
+     */
+    public function getRep7to11()
+    {
+        return $this->rep7to11;
+    }
+    /**
+     * Sets rep12to15.
+     * 
+     * @param int $rep12to15
+     * 
+     * @return $this
+     */
+    public function setRep12to15($rep12to15)
+    {
+        $this->rep12to15 = $rep12to15;
+
+        return $this;
+    }
+    /**
+     * Gets rep12to15.
+     * 
+     * @return int
+     */
+    public function getRep12to15()
+    {
+        return $this->rep12to15;
+    }
+    /**
+     * Sets repAdult.
+     * 
+     * @param int $repAdult
+     * 
+     * @return $this
+     */
+    public function setRepAdult($repAdult)
+    {
+        $this->repAdult = $repAdult;
+
+        return $this;
+    }
+    /**
+     * Gets repAdult.
+     * 
+     * @return int
+     */
+    public function getRepAdult()
+    {
+        return $this->repAdult;
+    }
+    /**
+     * Sets repSenior.
+     * 
+     * @param int $repSenior
+     * 
+     * @return $this
+     */
+    public function setRepSenior($repSenior)
+    {
+        $this->repSenior = $repSenior;
+
+        return $this;
+    }
+    /**
+     * Gets repSenior.
+     * 
+     * @return int
+     */
+    public function getRepSenior()
+    {
+        return $this->repSenior;
+    }
+    /**
+     * Sets total.
+     * 
+     * @param int $total
+     * 
+     * @return $this
+     */
+    public function setTotal($total)
+    {
+        $this->total = $total;
+
+        return $this;
+    }
+    /**
+     * Gets total.
+     * 
+     * @return int
+     */
+    public function getTotal()
+    {
+        return $this->total;
+    }
+    /**
+     * Set rep16to25
+     *
+     * @param integer $rep16to25
+     *
+     * @return EducationalProjectAge
+     */
+    public function setRep16to25($rep16to25)
+    {
+        $this->rep16to25 = $rep16to25;
+
+        return $this;
+    }
+    /**
+     * Get rep16to25
+     *
+     * @return integer
+     */
+    public function getRep16to25()
+    {
+        return $this->rep16to25;
+    }
+}

+ 158 - 0
old/Entity/Booking/EducationalProjectPublic.php

@@ -0,0 +1,158 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Type de public d'une prestation pédagogique EducationnalProject
+ *
+ * @Iri("http://schema.org/EducationalProjectPublic")
+ */
+#[ORM\Entity]
+class EducationalProjectPublic
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['educationalprojectpublic', 'educationalproject_details'])]
+    private $id;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Booking\EducationalProjectPublicFamillyEnum', 'toArray'])]
+    #[Groups(['educationalprojectpublic'])]
+    private $familly;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 255)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Booking\EducationalProjectPublicFamillyEnum', 'toArray'])]
+    #[Groups(['educationalprojectpublic', 'educationalproject_details_public'])]
+    private $subFamilly;
+    /**
+     * @var ArrayCollection<EducationalProject>
+     */
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\EducationalProject', mappedBy: 'public')]
+    #[Groups(['educationalprojectpublic_educationalproject'])]
+    private $educationalProjects;
+    /**
+     * Constructor
+     */
+    public function __construct()
+    {
+        $this->educationalProjects = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     * 
+     * @param int $id
+     * 
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     * 
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Sets familly.
+     * 
+     * @param string $familly
+     * 
+     * @return $this
+     */
+    public function setFamilly($familly)
+    {
+        $this->familly = $familly;
+
+        return $this;
+    }
+    /**
+     * Gets familly.
+     * 
+     * @return string
+     */
+    public function getFamilly()
+    {
+        return $this->familly;
+    }
+    /**
+     * Sets subFamilly.
+     * 
+     * @param string $subFamilly
+     * 
+     * @return $this
+     */
+    public function setSubFamilly($subFamilly)
+    {
+        $this->subFamilly = $subFamilly;
+
+        return $this;
+    }
+    /**
+     * Gets subFamilly.
+     * 
+     * @return string
+     */
+    public function getSubFamilly()
+    {
+        return $this->subFamilly;
+    }
+    /**
+     * Add educationalProject
+     *
+     * @param \AppBundle\Entity\Booking\EducationalProject $educationalProject
+     *
+     * @return EducationalProjectPublic
+     */
+    public function addEducationalProject(\AppBundle\Entity\Booking\EducationalProject $educationalProject)
+    {
+        $this->educationalProjects[] = $educationalProject;
+
+        return $this;
+    }
+    /**
+     * Remove educationalProject
+     *
+     * @param \AppBundle\Entity\Booking\EducationalProject $educationalProject
+     */
+    public function removeEducationalProject(\AppBundle\Entity\Booking\EducationalProject $educationalProject)
+    {
+        $this->educationalProjects->removeElement($educationalProject);
+    }
+    /**
+     * Get educationalProjects
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getEducationalProjects()
+    {
+        return $this->educationalProjects;
+    }
+}

+ 23 - 0
old/Entity/Booking/EducationalProjectRecur.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+
+/**
+ * EducationalProjectRecur.
+ *
+ * @Iri("http://schema.org/EducationalProjectRecur")
+ */
+#[ORM\Entity]
+class EducationalProjectRecur extends AbstractBookingRecur
+{
+    /**
+     * @var EducationalProject
+     */
+    #[ORM\ManyToOne(targetEntity: 'EducationalProject', inversedBy: 'eventRecur')]
+    #[Groups(['bookingrecur'])]
+    protected $event;
+}

+ 711 - 0
old/Entity/Booking/Event.php

@@ -0,0 +1,711 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use AppBundle\Entity\Message\Message;
+use AppBundle\Entity\Place\PlaceSystem;
+use AppBundle\Enum\Booking\ParticipationStatusEnum;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+
+use AppBundle\Entity\Core\File;
+use AppBundle\Validator\Constraints\Delete as OpentalentDelete;
+use AppBundle\Validator\Constraints\Booking as OpentalentEvent;
+use AppBundle\Entity\Place\Place;
+
+/**
+ * Evènement, rencontre
+ *
+ * @Iri("http://schema.org/Event")
+ * @OpentalentDelete\EntityDelete()
+ * @OpentalentEvent\Event()
+ */
+#[ORM\Entity(repositoryClass: 'AppBundle\Entity\Booking\Repository\EventRepository')]
+class Event extends AbstractBooking
+{
+    /**
+     * @var ArrayCollection<EventRecur>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'EventRecur', mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['event_bookingrecur', 'planning_detail', 'booking_event'])]
+    protected $eventRecur;
+    /**
+     * @var ArrayCollection<Event>
+     */
+    #[ORM\OneToMany(targetEntity: 'Event', mappedBy: 'parent', orphanRemoval: true)]
+    #[Groups(['event_timeline'])]
+    private $timeline;
+    /**
+     * @var \AppBundle\Entity\Booking\Event
+     */
+    #[ORM\ManyToOne(targetEntity: 'Event', inversedBy: 'timeline')]
+    #[Groups(['event'])]
+    private $parent;
+    /**
+     * @var string
+     */
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Booking\EventTimelineTypeEnum', 'toArray'], multiple: false, min: 1)]
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Groups(['event', 'booking_event'])]
+    private $type;
+    /**
+     * @var File An image of the item. This can be a [URL](http://schema.org/URL) or a fully described [ImageObject](http://schema.org/ImageObject).
+     * @Iri("https://schema.org/image")
+     */
+    #[Assert\Valid]
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Core\File', inversedBy: 'events', cascade: ['persist'])]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['event', 'booking_event', 'planning_detail', 'invitations_list_event', 'event_details', 'activity_reports'])]
+    private $image;
+    /**
+     * @var string URL of the item.
+     *
+     * @Iri("https://schema.org/url")
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Url]
+    #[Assert\Regex(pattern: '/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/', message: 'url-error')]
+    #[Groups(['event', 'planning_detail', 'event_details', 'booking_event'])]
+    private $url;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['event', 'event_details', 'booking_event', 'planning_detail'])]
+    private $additionalInformation;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: false)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Booking\VisibilityEnum', 'toArray'])]
+    #[Groups(['event', 'planning_detail', 'event_details', 'booking_event'])]
+    private $visibility;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['event', 'planning_detail'])]
+    private $report;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['event', 'planning_detail'])]
+    private $comment;
+    /**
+     * @var EventGender
+     */
+    #[ORM\ManyToOne(targetEntity: 'EventGender')]
+    #[Groups(['event', 'booking_event', 'activity_report', 'planning_detail'])]
+    private $gender;
+    /**
+     * @var ArrayCollection<EventUser>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'EventUser', mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['event_eventuser', 'planning_detail', 'presence_attendance', 'event_details'])]
+    private $eventUser;
+    /**
+     * @var ArrayCollection<Medal>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'EventUser', mappedBy: 'event', cascade: ['persist'], orphanRemoval: true, fetch: 'EXTRA_LAZY')]
+    #[Groups(['event_details'])]
+    #[ORM\OrderBy(['id' => 'DESC'])]
+    private $eventUserFiltered;
+    /**
+     * @var array
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Groups(['event', 'event_details', 'planning_detail', 'booking_event'])]
+    private $rule = array();
+    /**
+     * @var ArrayCollection<Categories>
+     */
+    #[Assert\Valid]
+    #[ORM\ManyToMany(targetEntity: '\AppBundle\Entity\Core\Categories', cascade: ['persist'])]
+    #[Groups(['event_categories', 'planning_detail', 'event_details', 'booking_event'])]
+    private $categories;
+    /**
+     * @var ArrayCollection<EventReport>
+     */
+    #[ORM\OneToMany(targetEntity: '\AppBundle\Entity\Booking\EventReport', mappedBy: 'event', orphanRemoval: true)]
+    #[Groups(['event_eventreport', 'planning_detail', 'event_details'])]
+    private $eventReports;
+    /**
+     * @var ArrayCollection<AppBundle\Entity\Core\File>.
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\File', cascade: ['persist'], orphanRemoval: true)]
+    #[ORM\JoinTable(name: 'event_files', joinColumns: [], inverseJoinColumns: [])]
+    #[ORM\JoinColumn(name: 'event_id', referencedColumnName: 'id', onDelete: 'cascade')]
+    #[ORM\JoinColumn(name: 'file_id', referencedColumnName: 'id', onDelete: 'cascade')]
+    #[Groups(['booking_event', 'booking_event_documents', 'event_details'])]
+    private $files;
+    /**
+     * var ArrayCollection<AttendanceBooking>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\AttendanceBooking', cascade: ['persist'], mappedBy: 'event', orphanRemoval: true)]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Groups(['event_attendancebooking', 'presence_attendance', 'planning_detail', 'booking_event', 'event_details'])]
+    private $attendanceBooking;
+    /**
+     * @var array
+     */
+    #[Groups(['planning_list', 'activity_report'])]
+    private $scoreParticipation;
+    /**
+     * @var PlaceSystem
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Place\PlaceSystem')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['booking', 'event_details', 'invitations_list_event', 'planning_detail', 'booking_event'])]
+    private $placeSystem;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    private $openAgendaId;
+    /**
+     * @var string URL of the tickets.
+     *
+     * @Iri("https://schema.org/url")
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Url]
+    #[Assert\Regex(pattern: '/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/', message: 'url-error')]
+    #[Groups(['event', 'planning_detail', 'event_details', 'booking_event'])]
+    private $urlTicket;
+    public function __construct() {
+        parent::__construct();
+        $this->eventUser = new ArrayCollection();
+        $this->eventUserFiltered = new ArrayCollection();
+        $this->categories = new ArrayCollection();
+        $this->eventReport = new ArrayCollection();
+        $this->files = new ArrayCollection();
+        $this->attendanceBooking = new ArrayCollection();
+    }
+    /**
+     * Sets image.
+     *
+     * @param string $image
+     *
+     * @return $this
+     */
+    public function setImage($image)
+    {
+        $this->image = $image;
+
+        return $this;
+    }
+    /**
+     * Gets image.
+     *
+     * @return string
+     */
+    public function getImage()
+    {
+        return $this->image;
+    }
+    /**
+     * Sets url.
+     *
+     * @param string $url
+     *
+     * @return $this
+     */
+    public function setUrl($url)
+    {
+        $this->url = $url;
+
+        return $this;
+    }
+    /**
+     * Gets url.
+     *
+     * @return string
+     */
+    public function getUrl()
+    {
+        return $this->url;
+    }
+    /**
+     * Sets additionalInformation.
+     *
+     * @param string $additionalInformation
+     *
+     * @return $this
+     */
+    public function setAdditionalInformation($additionalInformation)
+    {
+        $this->additionalInformation = $additionalInformation;
+
+        return $this;
+    }
+    /**
+     * Gets additionalInformation.
+     *
+     * @return string
+     */
+    public function getAdditionalInformation()
+    {
+        return $this->additionalInformation;
+    }
+    /**
+     * Sets visibility.
+     *
+     * @param string $visibility
+     *
+     * @return $this
+     */
+    public function setVisibility($visibility)
+    {
+        $this->visibility = $visibility;
+
+        return $this;
+    }
+    /**
+     * Gets visibility.
+     *
+     * @return string
+     */
+    public function getVisibility()
+    {
+        return $this->visibility;
+    }
+    /**
+     * Sets gender.
+     *
+     * @param EventGender $gender
+     *
+     * @return $this
+     */
+    public function setGender(EventGender $gender = null)
+    {
+        $this->gender = $gender;
+
+        return $this;
+    }
+    /**
+     * Gets gender.
+     *
+     * @return EventGender
+     */
+    public function getGender()
+    {
+        return $this->gender;
+    }
+    /**
+     * @param EventUser $eventUser
+     * @return $this
+     */
+    public function addEventUser(EventUser $eventUser)
+    {
+        $eventUser->setEvent($this);
+        $this->eventUser[] = $eventUser;
+
+        return $this;
+    }
+    /**
+     * @param ArrayCollection $eventUsers
+     * @return $this
+     */
+    public function setEventUser(ArrayCollection $eventUsers)
+    {
+        $this->eventUser = $eventUsers;
+        return $this;
+    }
+    /**
+     * @param EventUser $eventUser
+     * @return $this
+     */
+    public function removeEventUser(EventUser $eventUser)
+    {
+        $this->eventUser->removeElement($eventUser);
+        return $this;
+    }
+    /**
+     * @return mixed
+     */
+    public function getEventUser()
+    {
+        return ($this->eventUser) ? array_values($this->eventUser->toArray()) : new ArrayCollection();
+    }
+    /**
+     * Get donors
+     *3
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getEventUserFiltered()
+    {
+        $users = new ArrayCollection();
+        $usersIds = array();
+        foreach ($this->eventUserFiltered as $eventU){
+            if(!in_array($eventU->getGuest()->getId(), $usersIds) && count($usersIds) < 3){
+                $users->add($eventU);
+                $usersIds[] = $eventU->getGuest()->getId();
+            }
+
+        }
+        return $users;
+    }
+    /**
+     * @param string $rule
+     * @return $this
+     */
+    public function setRule($rule)
+    {
+        $this->rule = $rule;
+
+        return $this;
+    }
+    /**
+     * @return array
+     */
+    public function getRule()
+    {
+        return $this->rule;
+    }
+    /**
+     * Add category
+     *
+     * @param \AppBundle\Entity\Core\Categories $category
+     *
+     * @return Event
+     */
+    public function addCategory(\AppBundle\Entity\Core\Categories $category)
+    {
+        $this->categories[] = $category;
+
+        return $this;
+    }
+    /**
+     * Remove category
+     *
+     * @param \AppBundle\Entity\Core\Categories $category
+     */
+    public function removeCategory(\AppBundle\Entity\Core\Categories $category)
+    {
+        $this->categories->removeElement($category);
+    }
+    /**
+     * Get categories
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getCategories()
+    {
+        return $this->categories;
+    }
+    /**
+     * Add eventReport
+     *
+     * @param \AppBundle\Entity\Booking\EventReport $eventReport
+     *
+     * @return Event
+     */
+    public function addEventReport(\AppBundle\Entity\Booking\EventReport $eventReport)
+    {
+        $this->eventReports[] = $eventReport;
+
+        return $this;
+    }
+    /**
+     * Remove eventReport
+     *
+     * @param \AppBundle\Entity\Booking\EventReport $eventReport
+     */
+    public function removeEventReport(\AppBundle\Entity\Booking\EventReport $eventReport)
+    {
+        $this->eventReports->removeElement($eventReport);
+    }
+    /**
+     * Get eventReports
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getEventReports()
+    {
+        return $this->eventReports;
+    }
+    /**
+     * {@inheritdoc}
+     */
+    public function getParticipants() {
+        $participants = new ArrayCollection();
+        array_map(function (EventUser $eu) use ($participants) { $participants->add($eu->getGuest()->getPerson());}, $this->getEventUser());
+        return $participants;
+    }
+    /**
+     * Set type
+     *
+     * @param string $type
+     *
+     * @return Event
+     */
+    public function setType($type)
+    {
+        $this->type = $type;
+
+        return $this;
+    }
+    /**
+     * Get type
+     *
+     * @return string
+     */
+    public function getType()
+    {
+        return $this->type;
+    }
+    /**
+     * Set report
+     *
+     * @param string $report
+     *
+     * @return Event
+     */
+    public function setReport($report)
+    {
+        $this->report = $report;
+
+        return $this;
+    }
+    /**
+     * Get report
+     *
+     * @return string
+     */
+    public function getReport()
+    {
+        return $this->report;
+    }
+    /**
+     * Set comment
+     *
+     * @param string $comment
+     *
+     * @return Event
+     */
+    public function setComment($comment)
+    {
+        $this->comment = $comment;
+
+        return $this;
+    }
+    /**
+     * Get comment
+     *
+     * @return string
+     */
+    public function getComment()
+    {
+        return $this->comment;
+    }
+    /**
+     * Add timeline
+     *
+     * @param \AppBundle\Entity\Booking\Event $timeline
+     *
+     * @return Event
+     */
+    public function addTimeline(\AppBundle\Entity\Booking\Event $timeline)
+    {
+        $this->timeline[] = $timeline;
+
+        return $this;
+    }
+    /**
+     * Remove timeline
+     *
+     * @param \AppBundle\Entity\Booking\Event $timeline
+     */
+    public function removeTimeline(\AppBundle\Entity\Booking\Event $timeline)
+    {
+        $this->timeline->removeElement($timeline);
+    }
+    /**
+     * Get timeline
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getTimeline()
+    {
+        return $this->timeline;
+    }
+    /**
+     * Set parent
+     *
+     * @param \AppBundle\Entity\Booking\Event $parent
+     *
+     * @return Event
+     */
+    public function setParent(\AppBundle\Entity\Booking\Event $parent = null)
+    {
+        $this->parent = $parent;
+
+        return $this;
+    }
+    /**
+     * Get parent
+     *
+     * @return \AppBundle\Entity\Booking\Event
+     */
+    public function getParent()
+    {
+        return $this->parent;
+    }
+    /**
+     * Add attendanceBooking
+     *
+     * @param \AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking
+     *
+     * @return AbstractBooking
+     */
+    public function addAttendanceBooking(\AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking)
+    {
+        $attendanceBooking->setEvent($this);
+        $this->attendanceBooking[] = $attendanceBooking;
+
+        return $this;
+    }
+    /**
+     * Remove attendanceBooking
+     *
+     * @param \AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking
+     */
+    public function removeAttendanceBooking(\AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking)
+    {
+        $this->attendanceBooking->removeElement($attendanceBooking);
+    }
+    /**
+     * Get attendanceBooking
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getAttendanceBooking()
+    {
+        return $this->attendanceBooking;
+    }
+    /**
+     * @return array
+     */
+    public function getScoreParticipation()
+    {
+        return $this->scoreParticipation;
+    }
+    /**
+     * @param array $scoreParticipation
+     */
+    public function setScoreParticipation(array $scoreParticipation)
+    {
+        $this->scoreParticipation = $scoreParticipation;
+    }
+    /**
+     * Set place system
+     *
+     * @param \AppBundle\Entity\Place\PlaceSystem $placeSytem
+     *
+     * @return AbstractBooking
+     */
+    public function setPlaceSystem(\AppBundle\Entity\Place\PlaceSystem $placeSystem = null)
+    {
+        $this->placeSystem = $placeSystem;
+
+        return $this;
+    }
+    /**
+     * Get place
+     *
+     * @return \AppBundle\Entity\Place\PlaceSystem
+     */
+    public function getPlaceSystem()
+    {
+        return $this->placeSystem;
+    }
+    /**
+     * Add file
+     *
+     * @param \AppBundle\Entity\Core\File $file
+     *
+     * @return Message
+     */
+    public function addFile(\AppBundle\Entity\Core\File $file)
+    {
+        $this->files[] = $file;
+
+        return $this;
+    }
+    /**
+     * Remove file
+     *
+     * @param \AppBundle\Entity\Core\File $file
+     */
+    public function removeFile(\AppBundle\Entity\Core\File $file)
+    {
+        $this->files->removeElement($file);
+    }
+    /**
+     * Get files
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getFiles()
+    {
+        return $this->files;
+    }
+    /**
+     * Sets open agenda ID.
+     *
+     * @param string $openAgendaId
+     *
+     * @return $this
+     */
+    public function setOpenagendaId($openAgendaId)
+    {
+        $this->openAgendaId = $openAgendaId;
+
+        return $this;
+    }
+    /**
+     * Gets open agenda Id.
+     *
+     * @return string
+     */
+    public function getOpenAgendaId()
+    {
+        return $this->openAgendaId;
+    }
+    /**
+     * Sets url ticket.
+     *
+     * @param string $urlTicket
+     *
+     * @return $this
+     */
+    public function setUrlTicket($urlTicket)
+    {
+        $this->urlTicket = $urlTicket;
+
+        return $this;
+    }
+    /**
+     * Gets url ticket.
+     *
+     * @return string
+     */
+    public function getUrlTicket()
+    {
+        return $this->urlTicket;
+    }
+}

+ 144 - 0
old/Entity/Booking/EventGender.php

@@ -0,0 +1,144 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use AppBundle\Enum\TypeEnum;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Enum des genres d'évènements
+ *
+ * @Iri("http://schema.org/EventGender")
+ */
+#[ORM\Entity]
+class EventGender
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['eventgender', 'activity_report'])]
+    private $id;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 100)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Groups(['eventgender'])]
+    private $code;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 100)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Groups(['eventgender', 'activity_report'])]
+    private $name;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string')]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Booking\EventGenderTypeEnum', 'toArray'])]
+    #[Groups(['eventgender', 'activity_report'])]
+    private $type;
+    /**
+     * Sets id.
+     * 
+     * @param int $id
+     * 
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     * 
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Sets code.
+     * 
+     * @param string $code
+     * 
+     * @return $this
+     */
+    public function setCode($code)
+    {
+        $this->code = $code;
+
+        return $this;
+    }
+    /**
+     * Gets code.
+     * 
+     * @return string
+     */
+    public function getCode()
+    {
+        return $this->code;
+    }
+    /**
+     * Sets name.
+     * 
+     * @param string $name
+     * 
+     * @return $this
+     */
+    public function setName($name)
+    {
+        $this->name = $name;
+
+        return $this;
+    }
+    /**
+     * Gets name.
+     * 
+     * @return string
+     */
+    public function getName()
+    {
+        return $this->name;
+    }
+    /**
+     * Sets type.
+     * 
+     * @param string $type
+     * 
+     * @return $this
+     */
+    public function setType($type)
+    {
+        $this->type = $type;
+
+        return $this;
+    }
+    /**
+     * Gets type.
+     * 
+     * @return string
+     */
+    public function getType()
+    {
+        return $this->type;
+    }
+}

+ 23 - 0
old/Entity/Booking/EventRecur.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+
+/**
+ * Evènement récurrent
+ *
+ * @Iri("http://schema.org/EventRecur")
+ */
+#[ORM\Entity]
+class EventRecur extends AbstractBookingRecur
+{
+    /**
+     * @var Event
+     */
+    #[ORM\ManyToOne(targetEntity: 'Event', inversedBy: 'eventRecur')]
+    #[Groups(['bookingrecur', 'booking_event_eventrecur'])]
+    protected $event;
+}

+ 182 - 0
old/Entity/Booking/EventReport.php

@@ -0,0 +1,182 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use AppBundle\Entity\Core\File;
+use AppBundle\Entity\Message\Message;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Compte-rendu d'un évènement Event
+ *
+ * @Iri("http://schema.org/EventReport")
+ */
+#[ORM\Entity]
+class EventReport
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['eventreport', 'event_details'])]
+    private $id;
+    /**
+     * @var Event
+     */
+    #[ORM\ManyToOne(targetEntity: 'Event', inversedBy: 'eventReports')]
+    #[Groups(['eventreport'])]
+    private $event;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['eventreport', 'event_details_eventreports'])]
+    private $report;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: false)]
+    #[Assert\Date]
+    #[Assert\NotNull]
+    #[Groups(['eventreport', 'event_details_eventreports'])]
+    private $date;
+    /**
+     * @var ArrayCollection<AppBundle\Entity\Core\File>.
+     */
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Core\File', mappedBy: 'eventReport', orphanRemoval: true)]
+    #[Groups(['eventreport', 'event_details_eventreports'])]
+    private $files;
+    public function __construct() {
+        $this->files = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Set report
+     *
+     * @param string $report
+     *
+     * @return EventReport
+     */
+    public function setReport($report)
+    {
+        $this->report = $report;
+
+        return $this;
+    }
+    /**
+     * Get report
+     *
+     * @return string
+     */
+    public function getReport()
+    {
+        return $this->report;
+    }
+    /**
+     * Set date
+     *
+     * @param \DateTime $date
+     *
+     * @return EventReport
+     */
+    public function setDate($date)
+    {
+        $this->date = $date;
+
+        return $this;
+    }
+    /**
+     * Get date
+     *
+     * @return \DateTime
+     */
+    public function getDate()
+    {
+        return $this->date;
+    }
+    /**
+     * Set event
+     *
+     * @param \AppBundle\Entity\Booking\Event $event
+     *
+     * @return EventReport
+     */
+    public function setEvent(\AppBundle\Entity\Booking\Event $event = null)
+    {
+        $this->event = $event;
+
+        return $this;
+    }
+    /**
+     * Get event
+     *
+     * @return \AppBundle\Entity\Booking\Event
+     */
+    public function getEvent()
+    {
+        return $this->event;
+    }
+    /**
+     * Add file
+     *
+     * @param File $file
+     *
+     * @return Message
+     */
+    public function addFile(File $file)
+    {
+        $file->setEventReport($this);
+        $this->files[] = $file;
+        return $this;
+    }
+    /**
+     * Remove file
+     *
+     * @param File $file
+     */
+    public function removeFile(File $file)
+    {
+        $this->files->removeElement($file);
+    }
+    /**
+     * Get files
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getFiles()
+    {
+        return $this->files;
+    }
+}

+ 263 - 0
old/Entity/Booking/EventUser.php

@@ -0,0 +1,263 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Symfony\Component\Validator\Constraints as Assert;
+
+/**
+ *
+ * Participation d'un Access à un Event
+ *
+ * @Iri("http://schema.org/EventUser")
+ */
+#[ORM\Entity]
+#[ORM\Table]
+#[ORM\Index(name: 'participation', columns: ['participation'])]
+#[ORM\Index(name: 'datetimeStart', columns: ['datetimeStart'])]
+class EventUser
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['eventuser', 'presence_attendance', 'event_details'])]
+    private $id;
+    /**
+     * @var Event
+     */
+    #[ORM\ManyToOne(targetEntity: 'Event', inversedBy: 'eventUser')]
+    #[Groups(['eventuser', 'invitations_list'])]
+    private $event;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'eventUsers')]
+    #[Groups(['eventuser', 'presence_attendance_eventuser', 'event_details_eventuserfiltered', 'invitations_list', 'event_details_eventuser'])]
+    private $guest;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Booking\ParticipationStatusEnum', 'toArray'])]
+    #[Groups(['eventuser', 'invitations_list', 'event_details_eventuser'])]
+    private $participation;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', options: ['default' => 'READY'])]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Message\MessageStatusEnum', 'toArray'])]
+    #[Groups(['eventuser'])]
+    private $statusMail = "READY";
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'datetime')]
+    #[Assert\DateTime]
+    #[Assert\NotNull]
+    #[Groups(['eventuser', 'invitations_list', 'presence_attendance_eventuser', 'event_details_eventuser'])]
+    private $datetimeStart;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'datetime', nullable: true)]
+    #[Assert\DateTime]
+    #[Groups(['eventuser', 'invitations_list'])]
+    private $datetimeEnd;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['eventuser'])]
+    private $attendance = false;
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Sets event.
+     *
+     * @param Event $event
+     *
+     * @return $this
+     */
+    public function setEvent(Event $event = null)
+    {
+        $this->event = $event;
+
+        return $this;
+    }
+    /**
+     * Gets event.
+     *
+     * @return Event
+     */
+    public function getEvent()
+    {
+        return $this->event;
+    }
+    /**
+     * Sets guest.
+     *
+     * @param Access $guest
+     *
+     * @return $this
+     */
+    public function setGuest(Access $guest = null)
+    {
+        $this->guest = $guest;
+
+        return $this;
+    }
+    /**
+     * Gets guest.
+     *
+     * @return Access
+     */
+    public function getGuest()
+{
+    return $this->guest;
+}
+    /**
+     * Sets participation.
+     *
+     * @param string $participation
+     *
+     * @return $this
+     */
+    public function setParticipation($participation)
+    {
+        $this->participation = $participation;
+
+        return $this;
+    }
+    /**
+     * Gets participation.
+     *
+     * @return string
+     */
+    public function getParticipation()
+    {
+        return $this->participation;
+    }
+    /**
+     * Sets datetimeStart.
+     *
+     * @param \DateTime $datetimeStart
+     *
+     * @return $this
+     */
+    public function setDatetimeStart(\DateTime $datetimeStart)
+    {
+        $this->datetimeStart = $datetimeStart;
+
+        return $this;
+    }
+    /**
+     * Gets datetimeStart.
+     *
+     * @return \DateTime
+     */
+    public function getDatetimeStart()
+    {
+        return $this->datetimeStart;
+    }
+    /**
+     * Sets datetimeEnd.
+     *
+     * @param \DateTime $datetimeEnd
+     *
+     * @return $this
+     */
+    public function setDatetimeEnd(\DateTime $datetimeEnd)
+    {
+        $this->datetimeEnd = $datetimeEnd;
+
+        return $this;
+    }
+    /**
+     * Gets datetimeEnd.
+     *
+     * @return \DateTime
+     */
+    public function getDatetimeEnd()
+    {
+        return $this->datetimeEnd;
+    }
+    /**
+     * Sets attendance.
+     * 
+     * @param bool $attendance
+     * 
+     * @return $this
+     */
+    public function setAttendance($attendance)
+    {
+        $this->attendance = $attendance;
+
+        return $this;
+    }
+    /**
+     * Gets attendance.
+     * 
+     * @return bool
+     */
+    public function getAttendance()
+    {
+        return $this->attendance;
+    }
+    /**
+     * Sets statusMail.
+     *
+     * @param string $statusMail
+     *
+     * @return $this
+     */
+    public function setStatusMail($statusMail)
+    {
+        $this->statusMail = $statusMail;
+
+        return $this;
+    }
+    /**
+     * Gets statusMail.
+     *
+     * @return string
+     */
+    public function getStatusMail()
+    {
+        return $this->statusMail;
+    }
+}

+ 352 - 0
old/Entity/Booking/Examen.php

@@ -0,0 +1,352 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use AppBundle\Entity\Education\EducationCurriculum;
+use AppBundle\Entity\Organization\Jury;
+use AppBundle\Enum\Education\PratiqueEnum;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use Doctrine\Common\Collections\ArrayCollection;
+use AppBundle\Validator\Constraints\Booking as OpentalentEventAssert;
+
+/**
+ * Examen
+ *
+ * @Iri("http://schema.org/Examen")
+ * @OpentalentEventAssert\Examen()
+ */
+#[ORM\Entity]
+class Examen extends AbstractBooking
+{
+    /**
+     * @var ArrayCollection<ExamenRecur>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'ExamenRecur', mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['examen_bookingrecur', 'planning_detail', 'examen_informations_edit'])]
+    protected $eventRecur;
+    /**
+     * @var ArrayCollection<Examen>
+     */
+    #[ORM\OneToMany(targetEntity: 'Examen', mappedBy: 'parent', orphanRemoval: true)]
+    #[Groups(['examen_timeline'])]
+    private $timeline;
+    /**
+     * @var \AppBundle\Entity\Booking\Examen
+     */
+    #[ORM\ManyToOne(targetEntity: 'Examen', inversedBy: 'timeline')]
+    #[Groups(['examen'])]
+    private $parent;
+    /**
+     * @var string
+     */
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Booking\ExamenTimelineTypeEnum', 'toArray'], multiple: false, min: 1)]
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Groups(['examen'])]
+    private $type;
+    /**
+     * @var Jury
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Organization\Jury', inversedBy: 'examens', cascade: ['persist'])]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['examen', 'examenconvocation_list_examen', 'examen_details', 'planning_detail', 'presence_attendance', 'examen_informations_edit'])]
+    private $jury;
+    /**
+     * @var string
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\Education\Education', inversedBy: 'examens')]
+    #[ORM\JoinColumn(referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')]
+    #[Groups(['examen', 'examenconvocation_list_examen', 'planning_list', 'presence_attendance', 'examen_details', 'planning_detail', 'report_card_examenconvocations', 'examen_informations_edit'])]
+    private $education;
+    /**
+     * @var EducationCurriculum
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Education\EducationCurriculum')]
+    #[Groups(['examen_educationcurriculum', 'planning_detail', 'examenconvocation_list_examen', 'planning_list', 'presence_attendance', 'examen_details', 'examen_informations_edit'])]
+    private $educationCurriculum;
+    /**
+     * @var ArrayCollection<ExamenConvocation>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'ExamenConvocation', mappedBy: 'examen', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['examen_examenconvocation', 'presence_attendance', 'examen_details', 'planning_detail', 'examen_informations_edit'])]
+    private $convocation;
+    /**
+     * var ArrayCollection<AttendanceBooking>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Booking\AttendanceBooking', cascade: ['persist'], mappedBy: 'examen', orphanRemoval: true)]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Groups(['examen_attendancebooking', 'presence_attendance', 'planning_detail', 'examen_details'])]
+    private $attendanceBooking;
+    /**
+     * @var string
+     */
+    private $fullLabelTemplate;
+    public function __construct()
+    {
+      parent::__construct();  
+      $this->educationCurriculum = new ArrayCollection();
+      $this->convocation = new ArrayCollection();
+      $this->attendanceBooking = new ArrayCollection();
+    }
+    /**
+     * Sets jury.
+     * 
+     * @param Jury $jury
+     * 
+     * @return $this
+     */
+    public function setJury(\AppBundle\Entity\Organization\Jury $jury = null)
+    {
+        $this->jury = $jury;
+
+        return $this;
+    }
+    /**
+     * Gets jury.
+     * 
+     * @return Jury
+     */
+    public function getJury()
+    {
+        return $this->jury;
+    }
+    /**
+     * Add educationCurriculum
+     *
+     * @param EducationCurriculum $educationCurriculum
+     * @return EducationCurriculum
+     */
+    public function addEducationCurriculum(\AppBundle\Entity\Education\EducationCurriculum $educationCurriculum)
+    {
+        $this->educationCurriculum[] = $educationCurriculum;
+
+        return $this;
+    }
+    /**
+     * Remove educationCurriculum
+     *
+     * @param EducationCurriculum $educationCurriculum
+     */
+    public function removeEducationCurriculum(\AppBundle\Entity\Education\EducationCurriculum $educationCurriculum)
+    {
+        $this->educationCurriculum->removeElement($educationCurriculum);
+    }
+    /**
+     * Get educationCurriculum
+     *
+     * @return \Doctrine\Common\Collections\Collection 
+     */
+    public function getEducationCurriculum()
+    {
+        return $this->educationCurriculum;
+    }
+    /**
+     * Add convocation
+     *
+     * @param ExamenConvocation $convocation
+     * @return $this
+     */
+    public function addConvocation(ExamenConvocation $convocation)
+    {
+        $convocation->setExamen($this);
+        $this->convocation[] = $convocation;
+
+        return $this;
+    }
+    /**
+     * Remove convocation
+     *
+     * @param ExamenConvocation $convocation
+     * @return $this
+     */
+    public function removeConvocation(ExamenConvocation $convocation)
+    {
+        $this->convocation->removeElement($convocation);
+        return $this;
+    }
+    /**
+     * Get convocation
+     *
+     * @return ArrayCollection<ExamenConvocation>
+     */
+    public function getConvocation()
+    {
+        return $this->convocation;
+    }
+    /**
+     * {@inheritdoc}
+     */
+    public function getParticipants() {
+        $participants = new ArrayCollection();
+        array_map(function (ExamenConvocation $c) use ($participants) { $participants->add($c->getStudent()->getPerson());}, $this->getConvocation()->toArray());
+        return $participants;        
+    }
+    /**
+     * Set type
+     *
+     * @param string $type
+     *
+     * @return Examen
+     */
+    public function setType($type)
+    {
+        $this->type = $type;
+
+        return $this;
+    }
+    /**
+     * Get type
+     *
+     * @return string
+     */
+    public function getType()
+    {
+        return $this->type;
+    }
+    /**
+     * Add timeline
+     *
+     * @param \AppBundle\Entity\Booking\Examen $timeline
+     *
+     * @return Examen
+     */
+    public function addTimeline(\AppBundle\Entity\Booking\Examen $timeline)
+    {
+        $this->timeline[] = $timeline;
+
+        return $this;
+    }
+    /**
+     * Remove timeline
+     *
+     * @param \AppBundle\Entity\Booking\Examen $timeline
+     */
+    public function removeTimeline(\AppBundle\Entity\Booking\Examen $timeline)
+    {
+        $this->timeline->removeElement($timeline);
+    }
+    /**
+     * Get timeline
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getTimeline()
+    {
+        return $this->timeline;
+    }
+    /**
+     * Set parent
+     *
+     * @param \AppBundle\Entity\Booking\Examen $parent
+     *
+     * @return Examen
+     */
+    public function setParent(\AppBundle\Entity\Booking\Examen $parent = null)
+    {
+        $this->parent = $parent;
+
+        return $this;
+    }
+    /**
+     * Get parent
+     *
+     * @return \AppBundle\Entity\Booking\Examen
+     */
+    public function getParent()
+    {
+        return $this->parent;
+    }
+    /**
+     * Set education
+     *
+     * @param \AppBundle\Entity\Education\Education $education
+     *
+     * @return Examen
+     */
+    public function setEducation(\AppBundle\Entity\Education\Education $education = null)
+    {
+        $this->education = $education;
+
+        return $this;
+    }
+    /**
+     * Get education
+     *
+     * @return \AppBundle\Entity\Education\Education
+     */
+    public function getEducation()
+    {
+        return $this->education;
+    }
+    /**
+     * Add attendanceBooking
+     *
+     * @param \AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking
+     *
+     * @return AbstractBooking
+     */
+    public function addAttendanceBooking(\AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking)
+    {
+        $attendanceBooking->setExamen($this);
+        $this->attendanceBooking[] = $attendanceBooking;
+
+        return $this;
+    }
+    /**
+     * Remove attendanceBooking
+     *
+     * @param \AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking
+     */
+    public function removeAttendanceBooking(\AppBundle\Entity\Booking\AttendanceBooking $attendanceBooking)
+    {
+        $this->attendanceBooking->removeElement($attendanceBooking);
+    }
+    /**
+     * Get attendanceBooking
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getAttendanceBooking()
+    {
+        return $this->attendanceBooking;
+    }
+    /**
+     * Gets full label.
+     *
+     * @return array
+     */
+    public function getFullLabelTemplate()
+    {
+        $dateTimeStart = $this->getDatetimeStart();
+        $timezone = 'Europe/Paris';
+        $dateTimeStart->setTimezone(new \DateTimeZone($timezone));
+        $dateTimeStartFormatted = [];
+        $dateTimeStartFormatted[] = ['value' => $dateTimeStart->format('l') , 'translate' => true];
+        $dateTimeStartFormatted[] = $dateTimeStart->format('à H:i');
+        if(is_null($this->getEducation())){
+            return [];
+        }
+
+        $educationCurricullums = [];
+        foreach ($this->getEducationCurriculum() as $edc){
+            $educationCurricullums[] = ( $edc->getCycle() ? $edc->getCycle()->getLabel() : '' );
+            $educationCurricullums[] = ['value' => $edc->getYear(), 'translate' => true];
+            $educationCurricullums[] = $edc->getLevel();
+            $educationCurricullums[] = ', ';
+        }
+
+        $fullLabelTemplate = [
+            $this->getName(),
+            $this->getEducation()->getEducationCategory()->getLabel(),
+            ($this->getEducation()->getEducationComplement() && $this->getEducation()->getEducationComplement()->getName() !== PratiqueEnum::NONE)?$this->getEducation()->getEducationComplement()->getName():''
+        ];
+
+        return array_merge($fullLabelTemplate, $educationCurricullums, $dateTimeStartFormatted);
+    }
+}

+ 432 - 0
old/Entity/Booking/ExamenConvocation.php

@@ -0,0 +1,432 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use AppBundle\Annotation\ExportSplitFields;
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Product\Equipment;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use AppBundle\Entity\Person\Person;
+
+/**
+ *
+ * Convocation d'un Access (élève) à un Examen
+ *
+ * @Iri("http://schema.org/ExamenConvocation")
+ */
+#[ORM\Entity]
+class ExamenConvocation
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['examenconvocation', 'examenconvocation_list', 'report_card', 'presence_attendance', 'examen_details', 'planning_detail', 'examen_informations_edit'])]
+    private $id;
+    /**
+     * @var Examen
+     */
+    #[ORM\ManyToOne(targetEntity: 'Examen', inversedBy: 'convocation')]
+    #[Groups(['examenconvocation', 'examenconvocation_list', 'report_card_examenconvocations'])]
+    private $examen;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'examenConvocations')]
+    #[ORM\JoinColumn(nullable: false)]
+    #[Assert\NotNull]
+    #[Groups(['examenconvocation', 'examenconvocation_list', 'presence_attendance_convocation', 'examen_details_convocation', 'planning_detail_convocation', 'examenconvocation_list', 'examen_informations_edit_convocation', 'examenconvocation_list'])]
+    private $student;
+    /**
+     * @var ArrayCollection<Equipment>
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Product\Equipment')]
+    #[ORM\JoinTable(joinColumns: [], inverseJoinColumns: [])]
+    #[ORM\JoinColumn(name: 'examenconvocation_id', referencedColumnName: 'id')]
+    #[ORM\JoinColumn(name: 'equipment_id', referencedColumnName: 'id')]
+    #[Groups(['examenconvocation_equipment', 'examenconvocation_list', 'examen_informations_edit_convocation'])]
+    private $equipments;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['examenconvocation', 'examenconvocation_list', 'examen_informations_edit_convocation'])]
+    private $info;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['examenconvocation', 'examenconvocation_list', 'examen_informations_edit_convocation'])]
+    private $level;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'time', nullable: true)]
+    #[Assert\Time]
+    #[Groups(['examenconvocation', 'examenconvocation_list', 'examen_details_convocation', 'examen_informations_edit_convocation'])]
+    private $time;
+    /**
+     * @var float
+     */
+    #[ORM\Column(type: 'float', nullable: true)]
+    #[Assert\Type(type: 'float')]
+    #[Assert\GreaterThanOrEqual(value: 0)]
+    #[Assert\LessThanOrEqual(value: 100, message: 'lessThanOrEqual20')]
+    #[Groups(['examenconvocation', 'examenconvocation_list', 'report_card_examenconvocations', 'examen_informations_edit_convocation'])]
+    private $note;
+    /**
+     * @var string
+     */
+    #[Groups(['examenconvocation', 'examenconvocation_list'])]
+    private $noteTemplate;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 255, nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['examenconvocation', 'examenconvocation_list', 'report_card_examenconvocations', 'examen_informations_edit_convocation'])]
+    private $mention;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['examenconvocation', 'examenconvocation_list', 'report_card_examenconvocations', 'examen_informations_edit_convocation'])]
+    private $appreciation;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', length: 255)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\NotNull]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Booking\ExamenConvocationStatusEnum', 'toArray'])]
+    #[Groups(['examenconvocation', 'examenconvocation_list', 'examen_informations_edit_convocation'])]
+    private $status;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['examenconvocation', 'examenconvocation_list', 'examen_informations_edit_convocation'])]
+    private $isConvocated = false;
+    /**
+     * @var string
+     */
+    #[Groups(['examenconvocation_list', 'report_card_examenconvocations'])]
+    private $cycleYearLevelStudentTemplate;
+    public function __construct()
+    {
+        $this->equipments = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     * 
+     * @param int $id
+     * 
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     * 
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Sets examen.
+     * 
+     * @param Examen $examen
+     * 
+     * @return $this
+     */
+    public function setExamen(Examen $examen)
+    {
+        $this->examen = $examen;
+
+        return $this;
+    }
+    /**
+     * Gets examen.
+     * 
+     * @return Examen
+     */
+    public function getExamen()
+    {
+        return $this->examen;
+    }
+    /**
+     * Sets student.
+     * 
+     * @param Access $student
+     * 
+     * @return $this
+     */
+    public function setStudent(Access $student)
+    {
+        $this->student = $student;
+
+        return $this;
+    }
+    /**
+     * Gets student.
+     * 
+     * @return Access
+     */
+    public function getStudent()
+    {
+        return $this->student;
+    }
+    /**
+     * Sets info.
+     * 
+     * @param string $info
+     * 
+     * @return $this
+     */
+    public function setInfo($info)
+    {
+        $this->info = $info;
+
+        return $this;
+    }
+    /**
+     * Gets info.
+     * 
+     * @return string
+     */
+    public function getInfo()
+    {
+        return $this->info;
+    }
+    /**
+     * Sets level.
+     * 
+     * @param string $level
+     * 
+     * @return $this
+     */
+    public function setLevel($level)
+    {
+        $this->level = $level;
+
+        return $this;
+    }
+    /**
+     * Gets level.
+     * 
+     * @return string
+     */
+    public function getLevel()
+    {
+        return $this->level;
+    }
+    /**
+     * Sets time.
+     * 
+     * @param \DateTime $time
+     * 
+     * @return $this
+     */
+    public function setTime(\DateTime $time = null)
+    {
+        $this->time = $time;
+
+        return $this;
+    }
+    /**
+     * Gets time.
+     * 
+     * @return \DateTime
+     */
+    public function getTime()
+    {
+        return $this->time ? $this->time->format('H:i') : $this->time;
+    }
+    /**
+     * Sets note.
+     * 
+     * @param float $note
+     * 
+     * @return $this
+     */
+    public function setNote($note)
+    {
+        $this->note = (!is_null($note)) ? floatval($note) : $note;
+
+        return $this;
+    }
+    /**
+     * Gets note.
+     * 
+     * @return float
+     */
+    public function getNote()
+    {
+        return $this->note;
+    }
+    /**
+     * Sets mention.
+     * 
+     * @param string $mention
+     * 
+     * @return $this
+     */
+    public function setMention($mention)
+    {
+        $this->mention = $mention;
+
+        return $this;
+    }
+    /**
+     * Gets mention.
+     * 
+     * @return string
+     */
+    public function getMention()
+    {
+        return $this->mention;
+    }
+    /**
+     * Sets appreciation.
+     * 
+     * @param string $appreciation
+     * 
+     * @return $this
+     */
+    public function setAppreciation($appreciation)
+    {
+        $this->appreciation = $appreciation;
+
+        return $this;
+    }
+    /**
+     * Gets appreciation.
+     * 
+     * @return string
+     */
+    public function getAppreciation()
+    {
+        return $this->appreciation;
+    }
+    /**
+     * Sets status.
+     * 
+     * @param string $status
+     * 
+     * @return $this
+     */
+    public function setStatus($status)
+    {
+        $this->status = $status;
+
+        return $this;
+    }
+    /**
+     * Gets status.
+     * 
+     * @return string
+     */
+    public function getStatus()
+    {
+        return $this->status;
+    }
+    /**
+     * Add equipment
+     *
+     * @param \AppBundle\Entity\Product\Equipment $equipment
+     *
+     * @return ExamenConvocation
+     */
+    public function addEquipment(\AppBundle\Entity\Product\Equipment $equipment)
+    {
+        $this->equipments[] = $equipment;
+
+        return $this;
+    }
+    /**
+     * Remove equipment
+     *
+     * @param \AppBundle\Entity\Product\Equipment $equipment
+     */
+    public function removeEquipment(\AppBundle\Entity\Product\Equipment $equipment)
+    {
+        $this->equipments->removeElement($equipment);
+    }
+    /**
+     * Get equipments
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getEquipments()
+    {
+        return $this->equipments;
+    }
+    /**
+     * Sets isConvocated.
+     *
+     * @param bool $isConvocated
+     *
+     * @return $this
+     */
+    public function setIsConvocated($isConvocated)
+    {
+        $this->isConvocated = $isConvocated;
+
+        return $this;
+    }
+    /**
+     * Gets isConvocated.
+     *
+     * @return bool
+     */
+    public function getIsConvocated()
+    {
+        return $this->isConvocated;
+    }
+    /**
+     * @return float
+     */
+    public function getNoteTemplate()
+    {
+        return (!is_null($this->getNote())) ? floatval($this->getNote() / 5) : $this->getNote();
+    }
+    /**
+     * Gets full label.
+     *
+     * @return array
+     */
+    public function getCycleYearLevelStudentTemplate()
+    {
+        $cycleYearLevelStudent = '';
+        foreach($this->getExamen()->getEducationCurriculum() as $educationCurriculum){
+            foreach($this->getStudent()->getEducationStudent() as $educationStudent){
+                if(!is_null($educationCurriculum) && !is_null($educationStudent->getEducationCurriculum()) && $educationCurriculum->getId() === $educationStudent->getEducationCurriculum()->getId()){
+                    $cycleYearLevelStudent = $educationCurriculum->getCycleYearLevelTemplate();
+                    break;
+                }
+            }
+        }
+        return $cycleYearLevelStudent;
+    }
+}

+ 23 - 0
old/Entity/Booking/ExamenRecur.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+
+/**
+ * Examen récurrent
+ *
+ * @Iri("http://schema.org/ExamenRecur")
+ */
+#[ORM\Entity]
+class ExamenRecur extends AbstractBookingRecur
+{
+    /**
+     * @var Examen
+     */
+    #[ORM\ManyToOne(targetEntity: 'Examen', inversedBy: 'eventRecur')]
+    #[Groups(['bookingrecur'])]
+    protected $event;
+}

+ 31 - 0
old/Entity/Booking/OrganizationHoliday.php

@@ -0,0 +1,31 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+
+/**
+ * Périodes de vacances d'une Organization
+ *
+ * @Iri("http://schema.org/OrganizationHoliday")
+ */
+#[ORM\Entity]
+class OrganizationHoliday extends AbstractBooking
+{
+    /**
+     * @var ArrayCollection<OrganizationHolidayRecur>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'OrganizationHolidayRecur', mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['organizationholiday_bookingrecur'])]
+    protected $eventRecur;
+    public function __construct()
+    {
+        parent::__construct();
+        $this->eventRecur = new ArrayCollection();
+    }
+}

+ 23 - 0
old/Entity/Booking/OrganizationHolidayRecur.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+
+/**
+ * Périodes de vacances récurrentes d'une Organization
+ *
+ * @Iri("http://schema.org/OrganizationHolidayRecur")
+ */
+#[ORM\Entity]
+class OrganizationHolidayRecur extends AbstractBookingRecur
+{
+    /**
+     * @var OrganizationHoliday
+     */
+    #[ORM\ManyToOne(targetEntity: 'OrganizationHoliday', inversedBy: 'eventRecur')]
+    #[Groups(['bookingrecur'])]
+    protected $event;
+}

+ 120 - 0
old/Entity/Booking/PersonHoliday.php

@@ -0,0 +1,120 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\AccessAndFunction\Access;
+
+/**
+ * Périodes de vacances d'un Access
+ *
+ * @Iri("http://schema.org/PersonHoliday")
+ *
+ */
+#[ORM\Entity]
+class PersonHoliday extends AbstractBooking
+{
+    /**
+     * @var ArrayCollection<PersonHolidayRecur>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'PersonHolidayRecur', mappedBy: 'event', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['personholiday_bookingrecur', 'accessholidays_list'])]
+    protected $eventRecur;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToOne(targetEntity: '\AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'holidays')]
+    #[Groups(['personholiday', 'accessholidays_list'])]
+    private $access;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Assert\Type(type: 'boolean')]
+    #[Assert\NotNull]
+    #[Groups(['personholiday'])]
+    private $approval = false;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true, options: ['default' => 0])]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['personholiday'])]
+    private $unpaidLeave;
+    public function __construct()
+    {
+        parent::__construct();
+        $this->eventRecur = new ArrayCollection();
+    }
+    /**
+     * Sets access.
+     * 
+     * @param Access $access
+     * 
+     * @return $this
+     */
+    public function setAccess(Access $access = null)
+    {
+        $this->access = $access;
+
+        return $this;
+    }
+    /**
+     * Gets access.
+     * 
+     * @return Access
+     */
+    public function getAccess()
+    {
+        return $this->access;
+    }
+    /**
+     * Sets approval.
+     * 
+     * @param bool $approval
+     * 
+     * @return $this
+     */
+    public function setApproval($approval)
+    {
+        $this->approval = $approval;
+
+        return $this;
+    }
+    /**
+     * Gets approval.
+     * 
+     * @return bool
+     */
+    public function getApproval()
+    {
+        return $this->approval;
+    }
+    /**
+     * Sets unpaidLeave.
+     * 
+     * @param int $unpaidLeave
+     * 
+     * @return $this
+     */
+    public function setUnpaidLeave($unpaidLeave)
+    {
+        $this->unpaidLeave = $unpaidLeave;
+
+        return $this;
+    }
+    /**
+     * Gets unpaidLeave.
+     * 
+     * @return int
+     */
+    public function getUnpaidLeave()
+    {
+        return $this->unpaidLeave;
+    }
+}

+ 23 - 0
old/Entity/Booking/PersonHolidayRecur.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+
+/**
+ * Périodes de vacances récurrentes d'un Access
+ *
+ * @Iri("http://schema.org/PersonHolidayRecur")
+ */
+#[ORM\Entity]
+class PersonHolidayRecur extends AbstractBookingRecur
+{
+    /**
+     * @var PersonHoliday
+     */
+    #[ORM\ManyToOne(targetEntity: 'PersonHoliday', inversedBy: 'eventRecur')]
+    #[Groups(['bookingrecur'])]
+    protected $event;
+}

+ 39 - 0
old/Entity/Booking/Repository/AttendanceBookingRepository.php

@@ -0,0 +1,39 @@
+<?php
+
+namespace AppBundle\Entity\Booking\Repository;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use Doctrine\ORM\EntityRepository;
+
+class AttendanceBookingRepository extends EntityRepository {
+
+    /**
+     * @param \DateTime $date_start
+     * @param \DateTime $date_end
+     * @param Access $access
+     */
+    public function getAttendance(\DateTime $date_start, \DateTime $date_end, Access $access) {
+        $queryBuilder = $this->createQueryBuilder('o');
+
+        $queryBuilder
+            ->select('SUM(TIMESTAMPDIFF(MINUTE, o.datetimeStart, o.datetimeEnd)) AS time')
+            ->leftJoin('o.access', 'access')
+            ->andWhere('o.datetimeStart < :datetimeEnd')
+            ->andWhere(
+                $queryBuilder->expr()->orX(
+                    $queryBuilder->expr()->gt('o.datetimeEnd', ':datetimeStart'),
+                    $queryBuilder->expr()->isNull('o.datetimeEnd')
+                ))
+            ->andWhere('o.access = :access')
+            ->andWhere('access.organization = :organization')
+            ->setParameter('datetimeStart', $date_start)
+            ->setParameter('datetimeEnd', $date_end)
+            ->setParameter('access', $access)
+            ->setParameter('organization', $access->getOrganization())
+        ;
+
+        $query = $queryBuilder->getQuery();
+        $results = $query->getResult();
+        return $results;
+    }
+}

+ 13 - 0
old/Entity/Booking/Repository/BookingRepository.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace AppBundle\Entity\Booking\Repository;
+
+/**
+ * BookingRepository
+ *
+ * This class was generated by the Doctrine ORM. Add your own custom
+ * repository methods below.
+ */
+class BookingRepository extends \Doctrine\ORM\EntityRepository
+{
+}

+ 36 - 0
old/Entity/Booking/Repository/CalendarSynchroRepository.php

@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * Created by PhpStorm.
+ * User: alex
+ * Date: 18/02/16
+ * Time: 12:00
+ */
+
+namespace AppBundle\Entity\Booking\Repository;
+
+use Doctrine\ORM\EntityRepository;
+use Recurr\DateExclusion;
+use Recurr\Rule;
+use Recurr\Transformer\ArrayTransformer;
+use Recurr\Transformer\Constraint\BetweenConstraint;
+use Doctrine\ORM\Tools\Pagination\Paginator;
+use Dunglas\ApiBundle\Api\ResourceInterface;
+use Symfony\Component\HttpFoundation\Request;
+
+class CalendarSynchroRepository extends EntityRepository {
+
+    public function findByIdAndHash($calendarsynchro_id, $hash){
+
+
+        $qb = $this->createQueryBuilder('a');
+
+        $qb
+            ->where('a.id = :id')
+            ->andWhere('a.hash = :hash')
+            ->setParameter('id', $calendarsynchro_id)
+            ->setParameter('hash', $hash);
+
+        return $qb->getQuery()->getOneOrNullResult();
+    }
+}

+ 67 - 0
old/Entity/Booking/Repository/CourseRepository.php

@@ -0,0 +1,67 @@
+<?php
+
+namespace AppBundle\Entity\Booking\Repository;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use Doctrine\ORM\EntityRepository;
+
+class CourseRepository extends EntityRepository {
+
+    /**
+     * @param  $date_start
+     * @param  $date_end
+     * @param Access $access
+     */
+    public function getCourses($date_start, $date_end, Access $access) {
+        $queryBuilder = $this->createQueryBuilder('o');
+
+        $queryBuilder
+            ->andWhere(
+                    $queryBuilder->expr()->between('o.datetimeStart', ':dateStart', ':dateEnd')
+                )
+            ->andWhere('o.organization = :organization')
+            ->setParameter('dateStart', $date_start)
+            ->setParameter('dateEnd', $date_end)
+            ->setParameter('organization', $access->getOrganization())
+        ;
+
+        $query = $queryBuilder->getQuery();
+        $results = $query->getResult();
+
+        return $results;
+    }
+
+    /**
+     * @param $organization
+     * @param null $year
+     * @param null $idsCourses
+     * @return array
+     */
+    public function getCoursesToDuplicate($organization, $year = null, $idsCourses = null){
+        $qb = $this->createQueryBuilder('courses');
+
+        if($year){
+            $qb
+                ->andWhere($qb->expr()->eq('courses.startYear', ':year'))
+                ->setParameter('year', $year);
+        }else{
+            $qb
+                ->andWhere($qb->expr()->in('courses.id', ':ids'))
+                ->setParameter('ids', $idsCourses);
+        }
+
+        $qb
+            ->andWhere('courses.organization = :organization')
+            ->andWhere('courses.isCanceled = :canceled')
+            ->leftJoin('courses.timeline', 'timeline')
+            ->leftJoin('timeline.eventRecur', 'booking_recurr')
+            ->setParameter('organization', $organization)
+            ->setParameter('canceled', false)
+            ->having('COUNT(timeline.id) = 0')
+            ->having('COUNT(booking_recurr.id) = 0')
+            ->groupBy('courses.id')
+        ;
+
+        return $qb->getQuery()->getResult();
+    }
+}

+ 42 - 0
old/Entity/Booking/Repository/EducationalProjectRepository.php

@@ -0,0 +1,42 @@
+<?php
+
+namespace AppBundle\Entity\Booking\Repository;
+
+use Doctrine\ORM\EntityRepository;
+use Recurr\Rule;
+use Recurr\Transformer\ArrayTransformer;
+use Recurr\Transformer\Constraint\BetweenConstraint;
+use Doctrine\ORM\Tools\Pagination\Paginator;
+use Dunglas\ApiBundle\Api\ResourceInterface;
+use Symfony\Component\HttpFoundation\Request;
+
+class EducationalProjectRepository extends EntityRepository {
+
+    public function searchByIntervenants($teachersIds, $dateStart, $dateEnd, $organization) {
+
+        $queryBuilder= $this->createQueryBuilder('o')
+            ->andWhere('o.organization=:org')
+            ->andWhere('(o.datetimeStart BETWEEN :dateStart AND :dateEnd)')
+            ->leftjoin('o.public','pub')
+            ->addselect('pub')
+            ->leftjoin('o.silentPartner','sil')
+            ->addselect('sil')
+            ->leftjoin('o.intervenants', 'int')
+            ->addselect('int')
+            ->leftjoin('o.addressPostal', 'add')
+            ->addselect('add')
+            ->andWhere('int.id IN (:int)')
+            ->leftjoin('o.ageDistribution', 'age')
+            ->addselect('age')
+            ->leftjoin('o.eventRecur', 'er')
+            ->addselect('er')
+            ->setParameters([
+                ':org' => $organization,
+                ':int' => $teachersIds,
+                ':dateStart'=>new \DateTime($dateStart),
+                ':dateEnd'=> new \DateTime($dateEnd)
+            ]);
+
+        return $queryBuilder->getQuery()->getResult();
+    }
+}

+ 86 - 0
old/Entity/Booking/Repository/EventRepository.php

@@ -0,0 +1,86 @@
+<?php
+
+/**
+ * Created by PhpStorm.
+ * User: alex
+ * Date: 18/02/16
+ * Time: 12:00
+ */
+
+namespace AppBundle\Entity\Booking\Repository;
+
+use Doctrine\ORM\EntityRepository;
+use Recurr\DateExclusion;
+use Recurr\Rule;
+use Recurr\Transformer\ArrayTransformer;
+use Recurr\Transformer\Constraint\BetweenConstraint;
+use Doctrine\ORM\Tools\Pagination\Paginator;
+use Dunglas\ApiBundle\Api\ResourceInterface;
+use Symfony\Component\HttpFoundation\Request;
+
+class EventRepository extends EntityRepository {
+        
+    /**
+     * Get Attendance records
+     * 
+     * @param ResourceInterface $resource
+     * @param Request $request
+     * @param int $firstResult
+     * @param mixed int|string $itemsPerPage
+     * @return Paginator
+     */
+    public function getAttendanceRecord(ResourceInterface $resource, Request $request, $firstResult = 1, $itemsPerPage = 20) {
+        $queryBuilder = $this->createQueryBuilder('o')
+                ->select(''
+                        . 'NEW AppBundle\DTO\EventAttendanceRecord('
+                        . 'o.id,'
+                        . 'o.description,'
+                        . 'i.id,'
+                        . 'o.url,'
+                        . 'o.technicalDescription,'
+                        . 'o.visibility,'
+                        . 'o.report,'
+                        . 'o.datetimeMeeting,'
+                        . 'o.locationMeeting,'
+                        . 'o.comment,'
+                        . '(SELECT group_concat(eu.id) FROM AppBundle:Event\EventUser as eu WHERE eu.event = o.id), '
+                        . '(SELECT count(eupp.id) FROM AppBundle:Event\EventUser as eupp WHERE eupp.event = o.id AND eupp.participation = \'PARTICIPATE\'),' // plannedParticipation
+                        . '(SELECT count(eupnp.id) FROM AppBundle:Event\EventUser as eupnp WHERE eupnp.event = o.id AND eupnp.participation = \'NOT_PARTICIPATE\'),' // plannedNotParticipation
+                        . '(SELECT count(eunp.id) FROM AppBundle:Event\EventUser as eunp WHERE eunp.event = o.id AND eunp.participation = \'NOT_RESPONSE\'),' // withoutResponse
+                        . '(SELECT count(eua.id) FROM AppBundle:Event\EventUser as eua WHERE eua.event = o.id AND eua.attendance = 1)' // attendance
+                        . ')'
+                )
+                ->leftJoin('o.image', 'i')
+        ;
+
+        foreach ($resource->getFilters() as $filter) {
+            $filter->apply($resource, $queryBuilder, $request);
+        }
+
+        // Item per page should be equal to 'ALL'
+        if (is_int($itemsPerPage)) {
+            $queryBuilder->setFirstResult($firstResult);
+            $queryBuilder->setMaxResults($itemsPerPage);
+        }
+
+        $paginator = new \Doctrine\ORM\Tools\Pagination\Paginator($queryBuilder);
+        $paginator->setUseOutputWalkers(false);
+        return $paginator;
+    }
+
+    public function getOrganizationEvent($organization){
+        $datetime = new \DateTime();
+        $today = $datetime->format('Y-m-d');
+
+        $qb = $this->createQueryBuilder('a');
+
+        $qb
+            ->leftJoin('a.eventRecur', 'er')
+            ->where('a.organization = :organization')
+            ->andWhere('a.datetimeStart >= :today OR er.datetimeEnd >= :today')
+            ->setParameter('today', $today)
+            ->setParameter('organization', $organization);
+
+        return $qb->getQuery()->getResult();
+    }
+}

+ 224 - 0
old/Entity/Booking/Work.php

@@ -0,0 +1,224 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+use Symfony\Component\Validator\Constraints as Assert;
+
+/**
+ *
+ * Travail à faire pour un cours
+ *
+ * @Iri("http://schema.org/Work")
+ */
+#[ORM\Entity]
+class Work
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['work', 'worksbyusers_db'])]
+    private $id;
+    /**
+     * @var Course
+     */
+    #[ORM\ManyToOne(targetEntity: 'Course', inversedBy: 'work')]
+    #[Groups(['work', 'worksbyusers_db_work'])]
+    private $course;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'datetime')]
+    #[Assert\DateTime]
+    #[Assert\NotNull]
+    #[Groups(['work', 'worksbyusers_db_work'])]
+    private $datetime;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['work', 'worksbyusers_db_work'])]
+    private $work;
+    /**
+     * @var ArrayCollection<WorkByUser>
+     */
+    #[Assert\Valid]
+    #[ORM\OneToMany(targetEntity: 'WorkByUser', mappedBy: 'work', cascade: ['persist'], orphanRemoval: true)]
+    #[Groups(['work'])]
+    private $workByUsers;
+    /**
+     * @var ArrayCollection<AppBundle\Entity\Core\File>.
+     */
+    #[ORM\OneToMany(targetEntity: 'AppBundle\Entity\Core\File', mappedBy: 'work', orphanRemoval: true)]
+    #[Groups(['work', 'worksbyusers_db_work'])]
+    private $files;
+    public function __construct()
+    {
+        $this->workByUsers = new ArrayCollection();
+        $this->files = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Sets course.
+     *
+     * @param Course $course
+     *
+     * @return $this
+     */
+    public function setCourse(Course $course = null)
+    {
+        $this->course = $course;
+
+        return $this;
+    }
+    /**
+     * Gets course.
+     *
+     * @return Course
+     */
+    public function getCourse()
+    {
+        return $this->course;
+    }
+    /**
+     * Sets datetime.
+     *
+     * @param \DateTime $datetime
+     *
+     * @return $this
+     */
+    public function setDatetime(\DateTime $datetime)
+    {
+        $datetime->setTime($datetime->format("H"), $datetime->format("i"), 0);
+        $datetime->setTimezone(new \DateTimeZone('UTC'));
+        $this->datetime = $datetime;
+
+        return $this;
+    }
+    /**
+     * Gets datetime.
+     *
+     * @return \DateTime
+     */
+    public function getDatetime()
+    {
+        return $this->datetime;
+    }
+    /**
+     * Sets works.
+     *
+     * @param string $work
+     *
+     * @return $this
+     */
+    public function setWork($work)
+    {
+        $this->work = $work;
+
+        return $this;
+    }
+    /**
+     * Gets work.
+     *
+     * @return string
+     */
+    public function getWork()
+    {
+        return $this->work;
+    }
+    /**
+     * Add work By User
+     *
+     * @param WorkByUser $workByUSer
+     *
+     * @return Work
+     */
+    public function addWorkByUser(WorkByUser $workByUSer)
+    {
+        $workByUSer->setWork($this);
+        $this->workByUsers[] = $workByUSer;
+        return $this;
+    }
+    /**
+     * Remove work By User
+     *
+     * @param WorkByUser $workByUSer
+     */
+    public function removeWorkByUser(WorkByUser $workByUSer)
+    {
+        $this->workByUsers->removeElement($workByUSer);
+    }
+    /**
+     * Get work By User
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getWorkByUsers()
+    {
+        return $this->workByUsers;
+    }
+    /**
+     * Add file
+     *
+     * @param \AppBundle\Entity\Core\File $file
+     *
+     * @return Work
+     */
+    public function addFile(\AppBundle\Entity\Core\File $file)
+    {
+        $file->setWork($this);
+        $this->files[] = $file;
+
+        return $this;
+    }
+    /**
+     * Remove file
+     *
+     * @param \AppBundle\Entity\Core\File $file
+     */
+    public function removeFile(\AppBundle\Entity\Core\File $file)
+    {
+        $this->files->removeElement($file);
+    }
+    /**
+     * Get files
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getFiles()
+    {
+        return $this->files;
+    }
+}

+ 137 - 0
old/Entity/Booking/WorkByUser.php

@@ -0,0 +1,137 @@
+<?php
+
+namespace AppBundle\Entity\Booking;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ *
+ * Travail à faire pour un cours par un utilisateur
+ *
+ * @Iri("http://schema.org/WorkByUser")
+ */
+#[ORM\Entity]
+class WorkByUser
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['workbyuser', 'worksbyusers_db'])]
+    private $id;
+    /**
+     * @var Work
+     */
+    #[ORM\ManyToOne(targetEntity: 'Work', inversedBy: 'workByUsers')]
+    #[Groups(['workbyuser', 'worksbyusers_db'])]
+    private $work;
+    /**
+     * @var Work
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'workByUsers')]
+    #[Groups(['workbyuser'])]
+    private $student;
+    /**
+     * @var boolean
+     */
+    #[ORM\Column(type: 'boolean', options: ['default' => false])]
+    #[Groups(['workbyuser', 'worksbyusers_db'])]
+    private $isDone=false;
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Sets work.
+     *
+     * @param Work $work
+     *
+     * @return $this
+     */
+    public function setWork(Work $work = null)
+    {
+        $this->work = $work;
+
+        return $this;
+    }
+    /**
+     * Gets work.
+     *
+     * @return Work
+     */
+    public function getWork()
+    {
+        return $this->work;
+    }
+    /**
+     * Sets student.
+     *
+     * @param Access $student
+     *
+     * @return $this
+     */
+    public function setStudent(Access $student = null)
+    {
+        $this->student = $student;
+
+        return $this;
+    }
+    /**
+     * Gets student.
+     *
+     * @return Access
+     */
+    public function getStudent()
+    {
+        return $this->student;
+    }
+    /**
+     * Sets isDone.
+     *
+     * @param boolean $isDone
+     *
+     * @return $this
+     */
+    public function setIsDone($isDone)
+    {
+        $this->isDone = $isDone;
+
+        return $this;
+    }
+    /**
+     * Gets isDone.
+     *
+     * @return boolean
+     */
+    public function getIsDone()
+    {
+        return $this->isDone;
+    }
+}

+ 395 - 0
old/Entity/Core/AbstractControl.php

@@ -0,0 +1,395 @@
+<?php
+
+namespace AppBundle\Entity\Core;
+
+use AppBundle\Entity\AccessAndFunction\Access;
+use AppBundle\Entity\Person\Person;
+use AppBundle\Entity\Traits\ActivityPeriodTrait;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\ORM\Mapping as ORM;
+use Dunglas\ApiBundle\Annotation\Iri;
+use Symfony\Component\Serializer\Annotation\Groups;
+use Symfony\Component\Validator\Constraints as Assert;
+use AppBundle\Entity\Traits\TimestampableEntity;
+use AppBundle\Entity\Traits\CreatorUpdaterEntity;
+
+/**
+ * Contrôle du bon état des Place, Room et Equipment, effectué ou planifié
+ * Classe de base de @see PlaceControl, RoomControl, EquipmentControl
+ *
+ * @author vincent
+ *
+ */
+#[ORM\Entity]
+#[ORM\Table(name: 'Control')]
+#[ORM\InheritanceType('SINGLE_TABLE')]
+#[ORM\DiscriminatorColumn(name: 'discr', type: 'string')]
+#[ORM\DiscriminatorMap(['place' => 'AppBundle\Entity\Place\PlaceControl', 'room' => 'AppBundle\Entity\Place\RoomControl', 'equipment' => 'AppBundle\Entity\Product\EquipmentControl'])]
+abstract class AbstractControl
+{
+    use TimestampableEntity;
+    use CreatorUpdaterEntity;
+    use ActivityPeriodTrait;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer')]
+    #[ORM\Id]
+    #[ORM\GeneratedValue(strategy: 'AUTO')]
+    #[Groups(['control', 'equipmentcontrol_list', 'placecontrol_list', 'equipment_details', 'control_edit'])]
+    private $id;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Assert\Choice(callback: ['\AppBundle\Enum\Product\ControlTypeEnum', 'toArray'])]
+    #[Groups(['control', 'equipmentcontrol_list', 'placecontrol_list', 'equipment_details_equipmentcontrol', 'control_edit'])]
+    private $controlType;
+    /**
+     * @var bool
+     */
+    #[ORM\Column(type: 'boolean', nullable: true)]
+    #[Assert\Type(type: 'boolean')]
+    #[Groups(['control', 'equipmentcontrol_list', 'placecontrol_list', 'control_edit'])]
+    private $report;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'string', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['control', 'equipmentcontrol_list', 'placecontrol_list', 'equipment_details_equipmentcontrol', 'control_edit'])]
+    private $operator;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['control', 'equipmentcontrol_list', 'placecontrol_list', 'control_edit'])]
+    private $finding;
+    /**
+     * @var string
+     */
+    #[ORM\Column(type: 'text', nullable: true)]
+    #[Assert\Type(type: 'string')]
+    #[Groups(['control', 'equipmentcontrol_list', 'placecontrol_list', 'control_edit'])]
+    private $workDoing;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['control', 'equipmentcontrol_list', 'equipment_details_equipmentcontrol', 'control_edit'])]
+    private $lifeBalance;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['control', 'equipmentcontrol_list', 'control_edit'])]
+    private $usedDuration;
+    /**
+     * @var Access
+     */
+    #[ORM\ManyToOne(targetEntity: 'AppBundle\Entity\AccessAndFunction\Access', inversedBy: 'accompanistControl')]
+    #[ORM\JoinColumn(nullable: true)]
+    #[Groups(['control', 'equipmentcontrol_list', 'control_edit'])]
+    private $accompanist;
+    /**
+     * @var int
+     */
+    #[ORM\Column(type: 'integer', nullable: true)]
+    #[Assert\Type(type: 'integer', message: 'invalid-integer')]
+    #[Groups(['control', 'equipmentcontrol_list', 'equipment_details_equipmentcontrol', 'control_edit'])]
+    private $balanceUsefulLife;
+    /**
+     * @var \DateTime
+     */
+    #[ORM\Column(type: 'date', nullable: true)]
+    #[Assert\Date]
+    #[Groups(['control', 'equipmentcontrol_list', 'placecontrol_list', 'equipment_details_equipmentcontrol', 'control_edit'])]
+    private $nextControl;
+    /**
+     * @var ArrayCollection<Tagg>
+     */
+    #[ORM\ManyToMany(targetEntity: 'AppBundle\Entity\Core\Tagg', cascade: ['persist'], inversedBy: 'controls')]
+    #[Assert\Valid]
+    #[ORM\JoinTable(name: 'tag_control', joinColumns: [], inverseJoinColumns: [])]
+    #[ORM\JoinColumn(name: 'control_id', referencedColumnName: 'id')]
+    #[ORM\JoinColumn(name: 'tag_id', referencedColumnName: 'id')]
+    #[Groups(['control_tags', 'manage_tags', 'equipmentcontrol_list'])]
+    private $tags;
+    public function __construct() {
+        $this->tags = new ArrayCollection();
+    }
+    /**
+     * Sets id.
+     *
+     * @param int $id
+     *
+     * @return $this
+     */
+    public function setId($id)
+    {
+        $this->id = $id;
+
+        return $this;
+    }
+    /**
+     * Gets id.
+     *
+     * @return int
+     */
+    public function getId()
+    {
+        return $this->id;
+    }
+    /**
+     * Sets controlType.
+     *
+     * @param string $controlType
+     *
+     * @return $this
+     */
+    public function setControlType($controlType)
+    {
+        $this->controlType = $controlType;
+
+        return $this;
+    }
+    /**
+     * Gets controlType.
+     *
+     * @return string
+     */
+    public function getControlType()
+    {
+        return $this->controlType;
+    }
+    /**
+     * Sets report.
+     *
+     * @param bool $report
+     *
+     * @return $this
+     */
+    public function setReport($report)
+    {
+        $this->report = $report;
+
+        return $this;
+    }
+    /**
+     * Gets report.
+     *
+     * @return bool
+     */
+    public function getReport()
+    {
+        return $this->report;
+    }
+    /**
+     * Sets operator.
+     *
+     * @param string $operator
+     *
+     * @return $this
+     */
+    public function setOperator($operator)
+    {
+        $this->operator = $operator;
+
+        return $this;
+    }
+    /**
+     * Gets operator.
+     *
+     * @return string
+     */
+    public function getOperator()
+    {
+        return $this->operator;
+    }
+    /**
+     * Sets finding.
+     *
+     * @param string $finding
+     *
+     * @return $this
+     */
+    public function setFinding($finding)
+    {
+        $this->finding = $finding;
+
+        return $this;
+    }
+    /**
+     * Gets finding.
+     *
+     * @return string
+     */
+    public function getFinding()
+    {
+        return $this->finding;
+    }
+    /**
+     * Sets workDoing.
+     *
+     * @param string $workDoing
+     *
+     * @return $this
+     */
+    public function setWorkDoing($workDoing)
+    {
+        $this->workDoing = $workDoing;
+
+        return $this;
+    }
+    /**
+     * Gets workDoing.
+     *
+     * @return string
+     */
+    public function getWorkDoing()
+    {
+        return $this->workDoing;
+    }
+    /**
+     * Sets lifeBalance.
+     *
+     * @param int $lifeBalance
+     *
+     * @return $this
+     */
+    public function setLifeBalance($lifeBalance)
+    {
+        $this->lifeBalance = $lifeBalance;
+
+        return $this;
+    }
+    /**
+     * Gets lifeBalance.
+     *
+     * @return int
+     */
+    public function getLifeBalance()
+    {
+        return $this->lifeBalance;
+    }
+    /**
+     * Sets usedDuration.
+     *
+     * @param int $usedDuration
+     *
+     * @return $this
+     */
+    public function setUsedDuration($usedDuration)
+    {
+        $this->usedDuration = $usedDuration;
+
+        return $this;
+    }
+    /**
+     * Gets usedDuration.
+     *
+     * @return int
+     */
+    public function getUsedDuration()
+    {
+        return $this->usedDuration;
+    }
+    /**
+     * @param Access|null $accompanist
+     * @return $this
+     */
+    public function setAccompanist(Access $accompanist = null)
+    {
+        $this->accompanist = $accompanist;
+
+        return $this;
+    }
+    /**
+     * Gets accompanist.
+     *
+     * @return Access
+     */
+    public function getAccompanist()
+    {
+        return $this->accompanist;
+    }
+    /**
+     * Sets balanceUsefulLife.
+     *
+     * @param int $balanceUsefulLife
+     *
+     * @return $this
+     */
+    public function setBalanceUsefulLife($balanceUsefulLife)
+    {
+        $this->balanceUsefulLife = $balanceUsefulLife;
+
+        return $this;
+    }
+    /**
+     * Gets balanceUsefulLife.
+     *
+     * @return int
+     */
+    public function getBalanceUsefulLife()
+    {
+        return $this->balanceUsefulLife;
+    }
+    /**
+     * Sets nextControl.
+     *
+     * @param \DateTime $nextControl
+     *
+     * @return $this
+     */
+    public function setNextControl(\DateTime $nextControl = null)
+    {
+        $this->nextControl = $nextControl;
+
+        return $this;
+    }
+    /**
+     * Gets nextControl.
+     *
+     * @return \DateTime
+     */
+    public function getNextControl()
+    {
+        return $this->nextControl ? $this->nextControl->format('Y-m-d') : $this->nextControl;
+    }
+    /**
+     * Add tag
+     *
+     * @param \AppBundle\Entity\Core\Tagg $tag
+     *
+     * @return AbstractControl
+     */
+    public function addTag(\AppBundle\Entity\Core\Tagg $tag)
+    {
+        $this->tags[] = $tag;
+
+        return $this;
+    }
+    /**
+     * Remove tag
+     *
+     * @param \AppBundle\Entity\Core\Tagg $tag
+     */
+    public function removeTag(\AppBundle\Entity\Core\Tagg $tag)
+    {
+        $this->tags->removeElement($tag);
+    }
+    /**
+     * Get tags
+     *
+     * @return \Doctrine\Common\Collections\Collection
+     */
+    public function getTags()
+    {
+        return $this->tags;
+    }
+}

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