Skip to content

refactor: update operation and transaction mappers to use request DTOs and improve snapshot handling in tests#180

Merged
gorushkin merged 48 commits into
mainfrom
170-update-operation-entity-with-tests
Mar 11, 2026
Merged

refactor: update operation and transaction mappers to use request DTOs and improve snapshot handling in tests#180
gorushkin merged 48 commits into
mainfrom
170-update-operation-entity-with-tests

Conversation

@gorushkin

Copy link
Copy Markdown
Owner

No description provided.

…usecase

feat: 142 refactor UpdateTransactionUseCase and EntryFactory to manage entries and operations more effectively
- Added `compareEntry` and `compareOperation` functions to handle comparison logic for entries and operations.
- Created unit tests for both comparers to ensure correct behavior under various scenarios.
- Updated `EntryFactory` to utilize the new comparers for updating entries in transactions.
- Refactored entry and operation DTOs to include necessary fields for updates.
- Modified repository interfaces and implementations to replace soft delete methods with void methods.
- Updated transaction use case to handle entry updates more effectively.
- Enhanced domain entities with new methods for updating descriptions and operations.
- Adjusted tests across the application to reflect changes in entry and operation handling.
…during-updating-transaction

Refactor entry and operation management with enhanced comparison logic
…ositories-add-tests

feat: 154 implement update and voidByIds methods in EntryRepository with corresponding tests
- Commented out unused methods in OperationRepository for clarity.
- Updated insert method in OperationRepository to handle multiple operations.
- Implemented save method in OperationRepository to manage insertions and deletions.
- Enhanced TransactionRepository to include entry and operation management.
- Added transaction snapshot retrieval in TransactionRepository.
- Removed unimplemented methods and added necessary comments for future implementation.
Enhance transaction handling and repository management
#162)

* feat(database): add versioning to entries and transactions

- Introduced a new version column to the entries and transactions tables in the database schema.
- Updated the entry and transaction mappers to include the version field.
- Modified the entry and transaction entities to manage version increments on updates.
- Adjusted test cases to account for the new version field.
- Enhanced the journal to track changes related to version updates.

* Merge branch '144-refactoring-updatetransactionusecase' into 157-improve-transaction-updating

* Refactor Entry and Transaction Domain Logic

- Updated Entry creation to use userId instead of User object for better type handling.
- Modified tests for Entry to reflect changes in user ownership representation.
- Refactored Transaction entity to accept userId and updated related methods for entry management.
- Introduced EntryDraft and EntryUpdate types for better clarity in transaction entry handling.
- Enhanced transaction tests to validate entry management and updates.
- Removed deprecated transaction tests and ensured new tests cover all functionalities.

* feat(transaction): enhance transaction update logic and error handling

* fix(entity): update timestamps handling in Operation, Transaction, and User classes

* feat(transaction): add EntryDoesNotBelongToTransactionError and improve entry attachment validation
refactor: update repository interfaces and improve save methods with snapshots
…nusecase' into 164-update-entry-repository-tests
refactor(entry): streamline entry repository tests and enhance save logic
…ry-tests

refactor(operations): remove commented-out methods and improve transaction handling in tests
- Deleted EntriesService including EntryCreator, EntryUpdater, and EntryService classes.
- Removed operation.factory.ts and its associated tests.
- Updated Entry and TransactionBuilder to use TransactionBuildContext instead of EntryContext.
- Cleaned up imports and adjusted related tests accordingly.
…elated types

- Updated Transaction class to manage operations instead of entries.
- Refactored methods for creating, attaching, updating, and deleting operations.
- Adjusted TransactionSnapshot and related types to reflect operations structure.
- Removed entry-related logic and tests, ensuring focus on operations.
- Enhanced validation to ensure transaction balance based on operations.
…sistency

- Updated OperationProps and UpdateOperationProps to streamline operation handling.
- Refactored transaction entity tests to align with new operation structure.
- Removed EntryRepository and related tests to simplify the codebase.
- Adjusted transaction repository methods to accommodate new operation types.
- Enhanced validation schemas for transactions and operations to ensure data integrity.
…y associate operations, enhancing balance validation and simplifying schema
@gorushkin gorushkin linked an issue Mar 11, 2026 that may be closed by this pull request
@gorushkin gorushkin merged commit 1a76c73 into main Mar 11, 2026
2 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.

Update Operation Entity With Tests

1 participant