feat: add optional inventory package association to service items and implement audit logging

- Added `inventory_package_uuid` and `inventory_package_title` fields to the `ServiceItem` interface.
- Updated API documentation to reflect new fields in service item responses.
- Implemented methods in `ClinicServiceController` to handle inventory package associations.
- Created `ServiceItemAuditLog` entity and repository for tracking changes to service items.
- Added functionality to log changes to service items, including inventory package associations.
- Implemented tests for attaching/detaching inventory packages and auditing changes.
- Created database migrations for new fields and audit log table.
This commit is contained in:
hamed
2026-07-18 12:26:15 +03:30
parent 42d9ad26c5
commit c4a661b542
14 changed files with 885 additions and 24 deletions
+3
View File
@@ -516,6 +516,9 @@ export interface ServiceItem {
price_rials: number;
section_uuid?: string;
section_name?: string;
/** پکیج کالای مصرفی متصل به این خدمت (اختیاری) */
inventory_package_uuid?: string | null;
inventory_package_title?: string | null;
created_at?: number;
updated_at?: number;
/** primary staff (first member) — kept for backward compatibility */