Add Imported flag to FinanceRecord for import tracking#39
Conversation
Co-authored-by: PhantomDave <34485699+PhantomDave@users.noreply.github.com>
Co-authored-by: PhantomDave <34485699+PhantomDave@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds an Imported boolean flag to the FinanceRecord model to track records created via file import, enabling targeted deletion and filtering of imported data.
- Added
Importedproperty toFinanceRecorddomain model with a default value offalse - Created database migration to add the
Importedcolumn with proper default handling for existing records - Updated backend GraphQL schema and
FileImportServiceto set the flag during imports
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
PhantomDave.BankTracking.Library/Models/FinanceRecord.cs |
Added Imported boolean property with default false and explanatory comment |
PhantomDave.BankTracking.Data/Migrations/20251114205148_AddImportedFlagToFinanceRecord.cs |
Migration to add Imported column with false default for existing records |
PhantomDave.BankTracking.Data/Migrations/20251114205148_AddImportedFlagToFinanceRecord.Designer.cs |
Auto-generated migration designer metadata |
PhantomDave.BankTracking.Data/Migrations/BankTrackerDbContextModelSnapshot.cs |
Updated model snapshot with Imported property and EF version bump |
PhantomDave.BankTracking.Api/Types/ObjectTypes/FinanceRecordType.cs |
Added Imported to GraphQL type and mapping function |
PhantomDave.BankTracking.Api/Services/FileImportService.cs |
Set Imported = true for all records created via file import |
frontend/src/app/models/finance-record/gql/create-finance.mutation.graphql |
Added imported field to creation mutation response |
frontend/src/app/models/finance-record/gql/update-finance.mutation.graphql |
Added imported field to update mutation response |
frontend/src/app/models/finance-record/gql/get-finance-record.query.graphql |
Added imported field to query results |
frontend/src/app/models/import/gql/confirm-import.mutation.graphql |
Added imported field to import confirmation response |
Files not reviewed (1)
- PhantomDave.BankTracking.Data/Migrations/20251114205148_AddImportedFlagToFinanceRecord.Designer.cs: Language not supported
|
@copilot can we review the frontend dependencies to make it build? probably there is some outdated package |
Co-authored-by: PhantomDave <34485699+PhantomDave@users.noreply.github.com>
Fixed the frontend dependency issues. The problem was version mismatches between Angular packages - some were at 20.3.12, others at 20.3.10, and build/cli were at 20.3.9. Aligned all packages to 20.3.10 (the latest version available for all packages). Frontend now builds successfully. ✅ Commit: 9e362af |
Adding Imported flag to FinanceRecord model for import tracking
Importedboolean property to FinanceRecord modelSummary
Successfully implemented the
Importedflag for FinanceRecord model and fixed frontend build issues:Backend Changes:
Importedboolean property with default valuefalse20251114205148_AddImportedFlagToFinanceRecordthat adds the column with default valueImported = truefor all records created during importFrontend Changes:
importedfieldKey Features:
Imported = false(default)Imported = true(automatically set)Imported = false(not imported, auto-generated)Verification:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.