doctrine:
    dbal:
        url: '%env(resolve:DATABASE_URL)%'
        server_version: '8.0.37'
        mapping_types:
            enum: string
        types:
            enum: App\Eimaths\Services\EnumType
            genderEnum: App\Eimaths\User\Doctrine\GenderEnum
            userStatusEnum: App\Eimaths\User\Doctrine\UserStatusEnum
            countryStatusEnum: App\Eimaths\Address\Doctrine\CountryStatusEnum
            masterFranchiseeInformationStatusEnum: App\Eimaths\MasterFranchisee\Doctrine\MasterFranchiseeInformationStatusEnum
            mfPointsTransactionTypeEnum: App\Eimaths\Points\Doctrine\MFPointsTransactionTypeEnum
            mfPointsPurchasePaymentMethodEnum: App\Eimaths\Points\Doctrine\MFPointsPurchasePaymentMethodEnum
            franchiseeInformationStatusEnum: App\Eimaths\Franchisee\Doctrine\FranchiseeInformationStatusEnum
            teacherStatusEnum: App\Eimaths\Teacher\Doctrine\TeacherStatusEnum
            workbookInformationStatusEnum: App\Eimaths\EducationalMaterial\Doctrine\WorkbookInformationStatusEnum
            educationalTermStatusEnum: App\Eimaths\EducationalMaterial\Doctrine\EducationalTermStatusEnum
            educationalLevelStatusEnum: App\Eimaths\EducationalMaterial\Doctrine\EducationalLevelStatusEnum
            educationalCategoryStatusEnum: App\Eimaths\EducationalMaterial\Doctrine\EducationalCategoryStatusEnum
            productStatusEnum: App\Eimaths\Product\Doctrine\ProductStatusEnum
            studentStatusEnum: App\Eimaths\Student\Doctrine\StudentStatusEnum
            studentRenewalStatusEnum: App\Eimaths\Student\Doctrine\StudentRenewalStatusEnum
            studentKinRelationshipEnum: App\Eimaths\Student\Doctrine\StudentKinRelationshipEnum
            royaltyStatusEnum: App\Eimaths\Payment\Doctrine\RoyaltyStatusEnum
            invoiceStatusEnum: App\Eimaths\Payment\Doctrine\InvoiceStatusEnum
            invoicePaymentMethodEnum: App\Eimaths\Payment\Doctrine\InvoicePaymentMethodEnum
            paymentVoucherStatusEnum: App\Eimaths\Payment\Doctrine\PaymentVoucherStatusEnum
            invoiceCategoryEnum: App\Eimaths\Payment\Doctrine\InvoiceCategoryEnum
            invoiceTypeEnum: App\Eimaths\Payment\Doctrine\InvoiceTypeEnum
            orderStatusEnum: App\Eimaths\Order\Doctrine\OrderStatusEnum
            orderTypeEnum: App\Eimaths\Order\Doctrine\OrderTypeEnum
            MasterFranchiseeRoyaltyStatusEnum: App\Eimaths\MasterFranchisee\Doctrine\MasterFranchiseeRoyaltyStatusEnum
            roleStatusEnum: App\Eimaths\ACL\Doctrine\RoleStatusEnum

        # IMPORTANT: You MUST configure your server version,
        # either here or in the DATABASE_URL env var (see .env file)
        #server_version: '16'

        profiling_collect_backtrace: '%kernel.debug%'
        use_savepoints: true
    orm:
        auto_generate_proxy_classes: true
        enable_lazy_ghost_objects: true
        report_fields_where_declared: true
        validate_xml_mapping: true
        naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
        auto_mapping: true
        dql:
            string_functions:
                MONTH: DoctrineExtensions\Query\Mysql\Month
                YEAR: DoctrineExtensions\Query\Mysql\Year
            datetime_functions:
                date_format: DoctrineExtensions\Query\Mysql\DateFormat
        mappings:
            Eimaths\User:
                type: attribute
                is_bundle: false
                dir: '%kernel.project_dir%/src/Eimaths/User/Entity'
                prefix: 'App\Eimaths\User\Entity'
                alias: User
            Eimaths\ACL:
                type: attribute
                is_bundle: false
                dir: '%kernel.project_dir%/src/Eimaths/ACL/Entity'
                prefix: 'App\Eimaths\ACL\Entity'
                alias: ACL
            Eimaths\Address:
                type: attribute
                is_bundle: false
                dir: '%kernel.project_dir%/src/Eimaths/Address/Entity'
                prefix: 'App\Eimaths\Address\Entity'
                alias: Address
            Eimaths\MasterFranchisee:
                type: attribute
                is_bundle: false
                dir: '%kernel.project_dir%/src/Eimaths/MasterFranchisee/Entity'
                prefix: 'App\Eimaths\MasterFranchisee\Entity'
                alias: MasterFranchisee
            Eimaths\Franchisee:
                type: attribute
                is_bundle: false
                dir: '%kernel.project_dir%/src/Eimaths/Franchisee/Entity'
                prefix: 'App\Eimaths\Franchisee\Entity'
                alias: Franchisee
            Eimaths\Teacher:
                type: attribute
                is_bundle: false
                dir: '%kernel.project_dir%/src/Eimaths/Teacher/Entity'
                prefix: 'App\Eimaths\Teacher\Entity'
                alias: Teacher
            Eimaths\EducationalMaterial:
                type: attribute
                is_bundle: false
                dir: '%kernel.project_dir%/src/Eimaths/EducationalMaterial/Entity'
                prefix: 'App\Eimaths\EducationalMaterial\Entity'
                alias: EducationalMaterial
            Eimaths\MasterSetting:
                type: attribute
                is_bundle: false
                dir: '%kernel.project_dir%/src/Eimaths/MasterSetting/Entity'
                prefix: 'App\Eimaths\MasterSetting\Entity'
                alias: MasterSetting
            Eimaths\Product:
                type: attribute
                is_bundle: false
                dir: '%kernel.project_dir%/src/Eimaths/Product/Entity'
                prefix: 'App\Eimaths\Product\Entity'
                alias: Product
            Eimaths\Student:
                type: attribute
                is_bundle: false
                dir: '%kernel.project_dir%/src/Eimaths/Student/Entity'
                prefix: 'App\Eimaths\Student\Entity'
                alias: Student
            Eimaths\Payment:
                type: attribute
                is_bundle: false
                dir: '%kernel.project_dir%/src/Eimaths/Payment/Entity'
                prefix: 'App\Eimaths\Payment\Entity'
                alias: Payment
            Eimaths\Order:
                type: attribute
                is_bundle: false
                dir: '%kernel.project_dir%/src/Eimaths/Order/Entity'
                prefix: 'App\Eimaths\Order\Entity'
                alias: Order
            Eimaths\Notification:
                type: attribute
                is_bundle: false
                dir: '%kernel.project_dir%/src/Eimaths/Notification/Entity'
                prefix: 'App\Eimaths\Notification\Entity'
                alias: Notification
            Eimaths\Points:
                type: attribute
                is_bundle: false
                dir: '%kernel.project_dir%/src/Eimaths/Points/Entity'
                prefix: 'App\Eimaths\Points\Entity'
                alias: Points

when@test:
    doctrine:
        dbal:
            # "TEST_TOKEN" is typically set by ParaTest
            dbname_suffix: '_test%env(default::TEST_TOKEN)%'

when@prod:
    doctrine:
        orm:
            auto_generate_proxy_classes: false
            proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
            query_cache_driver:
                type: pool
                pool: doctrine.system_cache_pool
            result_cache_driver:
                type: pool
                pool: doctrine.result_cache_pool

    framework:
        cache:
            pools:
                doctrine.result_cache_pool:
                    adapter: cache.app
                doctrine.system_cache_pool:
                    adapter: cache.system
