feat(BE-58,59,60,61): implement stock transfer API, validation, audit log, and schema update

- Build stock transfer API with nested details, deliveries, and items
- Extend DB schema for stock transfers
- Implement validation for transfer request and stock
- Prepare/implement transfer audit log structure
- Preload all relations for complete response
- Update DTOs for nested response
- Remove redundant root fields, use relation objects
This commit is contained in:
aguhh18
2025-10-15 11:20:32 +07:00
parent 9b016dc30a
commit d1b377ddac
6 changed files with 210 additions and 44 deletions
@@ -25,7 +25,6 @@ type TransferDelivery struct {
DeliveryCostPerItem float64 `json:"delivery_cost_per_item" validate:"required"`
Document string `json:"document"`
DriverName string `json:"driver_name" validate:"required"`
DeliveryNoteNumber string `json:"delivery_note_number" validate:"required"`
VehiclePlate string `json:"vehicle_plate" validate:"required"`
SupplierID uint `json:"supplier_id" validate:"required"`
Products []TransferDeliveryProduct `json:"products" validate:"required,dive"`