Add Allegro shipment service and related components

- Implement AllegroShipmentService for managing shipment creation and status checks.
- Create ShipmentController to handle shipment preparation and label downloading.
- Introduce ShipmentPackageRepository for database interactions related to shipment packages.
- Add methods for retrieving delivery services, creating shipments, checking creation status, and downloading labels.
- Implement address validation and token management for Allegro API integration.
This commit is contained in:
2026-03-06 01:06:59 +01:00
parent 9df7a63244
commit 1b5e403c31
46 changed files with 6705 additions and 133 deletions

View File

@@ -0,0 +1,24 @@
CREATE TABLE IF NOT EXISTS company_settings (
id TINYINT UNSIGNED NOT NULL DEFAULT 1 PRIMARY KEY,
company_name VARCHAR(200) NULL,
person_name VARCHAR(200) NULL,
street VARCHAR(200) NULL,
city VARCHAR(128) NULL,
postal_code VARCHAR(16) NULL,
country_code CHAR(2) NOT NULL DEFAULT 'PL',
phone VARCHAR(64) NULL,
email VARCHAR(128) NULL,
tax_number VARCHAR(64) NULL,
bank_account VARCHAR(64) NULL,
bank_owner_name VARCHAR(200) NULL,
default_package_length_cm DECIMAL(8,1) NOT NULL DEFAULT 25.0,
default_package_width_cm DECIMAL(8,1) NOT NULL DEFAULT 20.0,
default_package_height_cm DECIMAL(8,1) NOT NULL DEFAULT 8.0,
default_package_weight_kg DECIMAL(8,3) NOT NULL DEFAULT 1.000,
default_label_format VARCHAR(8) NOT NULL DEFAULT 'PDF',
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
INSERT INTO company_settings (id) VALUES (1)
ON DUPLICATE KEY UPDATE updated_at = VALUES(updated_at);