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:
@@ -21,6 +21,10 @@
|
||||
- 2026-03-04: Rozszerzono zakladke `Ustawienia` integracji Allegro o kierunek synchronizacji statusow i interwal synchronizacji statusow; zapis do `app_settings` (`allegro_status_sync_direction`, `allegro_status_sync_interval_minutes`) - bez zmian schematu.
|
||||
- 2026-03-04: Dodano harmonogram `allegro_status_sync` (cron synchronizacji statusow) + defaulty `app_settings` dla kierunku i interwalu status sync - migracja `20260304_000028_add_allegro_status_sync_schedule.sql`.
|
||||
- 2026-03-04: Import Allegro mapuje forme wysylki do `orders.external_carrier_id` i `orders.external_carrier_account_id` - bez zmian schematu.
|
||||
- 2026-03-05: Dodano tabele `order_activity_log` — uniwersalny log aktywnosci zamowien (zmiany statusow, platnosci, przesylki, faktury, wiadomosci itp.).
|
||||
- 2026-03-05: Dodano tabele `apaczka_integration_settings` pod konfiguracje klucza API Apaczka.
|
||||
- 2026-03-05: Dodano tabele `inpost_integration_settings` pod konfiguracje integracji InPost ShipX.
|
||||
- 2026-03-06: Dodano kolumne `carrier` do tabeli `allegro_delivery_method_mappings` (default 'allegro') - umozliwia mapowanie na roznych przewoznikow (Allegro, InPost).
|
||||
- 2026-03-04: Poprawiono prezentacje daty zamowienia na liscie (`fallback ordered_at -> source_created_at -> source_updated_at -> fetched_at`) - bez zmian schematu.
|
||||
|
||||
## Tabele
|
||||
@@ -122,6 +126,44 @@
|
||||
- `allegro_order_status_mappings_code_unique` (UNIQUE: `allegro_status_code`),
|
||||
- `allegro_order_status_mappings_orderpro_code_idx` (`orderpro_status_code`).
|
||||
|
||||
### `order_activity_log`
|
||||
- Uniwersalny log aktywnosci zamowienia (zmiany statusow, platnosci, przesylki, faktury, wiadomosci itp.).
|
||||
- Kolumny:
|
||||
- `id` (PK, bigint unsigned, AI),
|
||||
- `order_id` (FK -> `orders.id`, CASCADE),
|
||||
- `event_type` (varchar 32) — typ zdarzenia: `status_change`, `payment`, `invoice`, `shipment`, `message`, `document`, `import`, `note`,
|
||||
- `summary` (varchar 255) — czytelny opis zdarzenia,
|
||||
- `details_json` (json, nullable) — dodatkowe dane strukturalne,
|
||||
- `actor_type` (varchar 16, domyslnie `system`) — `system`, `user`, `import`, `api`, `sync`,
|
||||
- `actor_name` (varchar 128, nullable) — nazwa uzytkownika lub identyfikator systemu,
|
||||
- `created_at`.
|
||||
- Indeksy:
|
||||
- `order_activity_log_order_created_idx` (`order_id`, `created_at`),
|
||||
- `order_activity_log_event_type_idx` (`event_type`).
|
||||
|
||||
### `apaczka_integration_settings`
|
||||
- Konfiguracja pojedynczej integracji Apaczka (`id = 1`) zarzadzanej z `Ustawienia > Integracja Apaczka`.
|
||||
- Kolumny:
|
||||
- `id` (PK, tinyint unsigned),
|
||||
- `api_key_encrypted` (text, nullable),
|
||||
- `created_at`, `updated_at`.
|
||||
|
||||
### `inpost_integration_settings`
|
||||
- Konfiguracja pojedynczej integracji InPost ShipX (`id = 1`) zarzadzanej z `Ustawienia > Integracja InPost`.
|
||||
- Kolumny:
|
||||
- `id` (PK, tinyint unsigned),
|
||||
- `api_token_encrypted` (text, nullable),
|
||||
- `organization_id` (varchar 50, nullable),
|
||||
- `environment` (enum: sandbox, production),
|
||||
- `default_dispatch_method` (enum: pop, parcel_locker, courier),
|
||||
- `default_dispatch_point` (varchar 50, nullable),
|
||||
- `default_insurance` (decimal 10,2, nullable),
|
||||
- `default_locker_size` (enum: small, medium, large),
|
||||
- `default_courier_length`, `default_courier_width`, `default_courier_height` (smallint unsigned),
|
||||
- `label_format` (enum: Pdf, Zpl, Epl),
|
||||
- `weekend_delivery`, `auto_insurance_value`, `multi_parcel` (tinyint 0/1),
|
||||
- `created_at`, `updated_at`.
|
||||
|
||||
## Zasady aktualizacji
|
||||
- Po kazdej migracji dopisz:
|
||||
- nowe/zmienione tabele i kolumny,
|
||||
|
||||
Reference in New Issue
Block a user