Add unit tests for invoicing period pagination, normalization, and filtering logic
- Implemented `InvoicingPeriodPaginationTest` for testing period pagination modes, normalization of options, search functionality, and visibility filters. - Added comprehensive tests to validate scenarios such as active period views, exact counts, and customer-card level search. - Improved cURL timeout settings with `CURLOPT_CONNECTTIMEOUT` and `CURLOPT_TIMEOUT` adjustments. - Introduced and documented helper classes/methods for local caching, pagination response structure, and customer name retrieval.
This commit is contained in:
@@ -232,7 +232,9 @@ CREATE TABLE IF NOT EXISTS `orders` (
|
||||
KEY `idx_orders_customer_id` (`customer_id`),
|
||||
KEY `idx_orders_department_id` (`department_id`),
|
||||
KEY `idx_orders_invoice_collection_id` (`invoice_collection_id`),
|
||||
KEY `idx_orders_reg_1` (`reg_1`)
|
||||
KEY `idx_orders_reg_1` (`reg_1`),
|
||||
KEY `idx_orders_period_customer_created_deleted` (`customer_id`, `created_at`, `deleted_at`),
|
||||
KEY `idx_orders_period_created_deleted_customer` (`created_at`, `deleted_at`, `customer_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
|
||||
SQL,
|
||||
'order_bookings' => <<<'SQL'
|
||||
@@ -278,7 +280,8 @@ CREATE TABLE IF NOT EXISTS `order_items` (
|
||||
`deleted_at` DATETIME NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_order_items_order_id` (`order_id`),
|
||||
KEY `idx_order_items_deleted_at` (`deleted_at`)
|
||||
KEY `idx_order_items_deleted_at` (`deleted_at`),
|
||||
KEY `idx_order_items_order_deleted` (`order_id`, `deleted_at`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
|
||||
SQL,
|
||||
'customer_vehicles' => <<<'SQL'
|
||||
@@ -336,6 +339,9 @@ CREATE TABLE IF NOT EXISTS `xlvask_usage_logs` (
|
||||
`ignored_at` DATETIME NULL,
|
||||
`ignored_by` INT NULL,
|
||||
`ignored_reason` TEXT NULL,
|
||||
`cached_total_net_amount` DECIMAL(12,2) NULL,
|
||||
`cached_primary_product_name` VARCHAR(255) NULL,
|
||||
`cached_amount_at` DATETIME NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uniq_xlvask_usage_logs_wash_id` (`WashId`),
|
||||
KEY `idx_xlvask_usage_logs_customer` (`CustomerId`),
|
||||
@@ -411,7 +417,8 @@ CREATE TABLE IF NOT EXISTS `customer_attributes` (
|
||||
`created_at` DATETIME NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `idx_customer_attributes_user_id` (`user_id`),
|
||||
KEY `idx_customer_attributes_attribute` (`attribute`)
|
||||
KEY `idx_customer_attributes_attribute` (`attribute`),
|
||||
KEY `idx_customer_attributes_attribute_user` (`attribute`, `user_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
|
||||
SQL,
|
||||
'module_config' => <<<'SQL'
|
||||
|
||||
Reference in New Issue
Block a user