Skip to content

feat: add BulkCreateSavingsDto and BulkSavingsItemDto for batch savin…#1157

Merged
Devsol-01 merged 1 commit into
Devsol-01:mainfrom
Oluwasuyi-Timilehin:feature/1141-backend-bulk-savings-transactions
Jun 30, 2026
Merged

feat: add BulkCreateSavingsDto and BulkSavingsItemDto for batch savin…#1157
Devsol-01 merged 1 commit into
Devsol-01:mainfrom
Oluwasuyi-Timilehin:feature/1141-backend-bulk-savings-transactions

Conversation

@Oluwasuyi-Timilehin

Copy link
Copy Markdown
Contributor

Description

This PR addresses backend issue #1141 by introducing a transactional bulk operations endpoint (/savings/bulk-create) within the Savings module. The system handles multiple incoming operational payloads atomically while enforcing strict per-item validations and ensuring execution idempotency via unique batch markers.

Fixes #1141

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Proposed Architecture & Changes

  1. Data Validation (bulk-create-savings.dto.ts): Implemented explicit class-validator constraints to check each individual item within the input list array before processing hits the query runner.
  2. Idempotency Guard (savings.service.ts): Integrated an execution tracking lookup check. Duplicate incoming identical batchId submissions are detected immediately, aborting re-execution and returning a cached state indicator safely.
  3. Transactional Safety / All-or-Nothing Strategy: Utilized TypeORM explicit database QueryRunner transactions. If a single ledger assignment item throws an exception inside the processing collection loop, the entire database transaction automatically rolls back.

How to Manually Test This Feature

Prerequisites

Ensure your local backend server runtime is active:

npm run start:dev

@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nestera Error Error Jun 30, 2026 3:28am

@Devsol-01 Devsol-01 merged commit e88c0b1 into Devsol-01:main Jun 30, 2026
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Backend] -- Add Bulk Operation Endpoints with Transactional Safety (Batch APIs)

2 participants