add payment group template#149
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds “payment group template” support to the Payments service, including persistence (EF Core models + migration) and CQRS-based CRUD/query APIs.
Changes:
- Introduces
PaymentGroupTemplate/PaymentGroupTemplateItementities and registers them inDataBaseContext, plus a migration to create the tables. - Adds commands + handlers to add/update/delete payment group templates.
- Adds queries + handlers (and API controller endpoints) to fetch a single template or list templates with their payment types.
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| Queries/PaymentGroupTemplates/GetPaymentGroupTemplates/GetPaymentGroupTemplatesResponse.cs | DTO for listing templates with item count + items |
| Queries/PaymentGroupTemplates/GetPaymentGroupTemplates/GetPaymentGroupTemplatesQueryHandler.cs | Query handler to list templates and their payment types |
| Queries/PaymentGroupTemplates/GetPaymentGroupTemplates/GetPaymentGroupTemplatesQuery.cs | Query contract for listing templates |
| Queries/PaymentGroupTemplates/GetPaymentGroupTemplate/GetPaymentGroupTemplateResponse.cs | DTOs for a single template + its payment types |
| Queries/PaymentGroupTemplates/GetPaymentGroupTemplate/GetPaymentGroupTemplateQueryHandler.cs | Query handler to fetch a single template by id |
| Queries/PaymentGroupTemplates/GetPaymentGroupTemplate/GetPaymentGroupTemplateQuery.cs | Query contract for fetching a template by id |
| Models/PaymentGroupTemplate/UpdatePaymentGroupTemplateRequest.cs | API request model for updating a template |
| Models/PaymentGroupTemplate/AddPaymentGroupTemplateRequest.cs | API request model for adding a template |
| Migrations/DataBaseContextModelSnapshot.cs | Updates EF model snapshot for new entities |
| Migrations/20260324200708_AddPaymentGroupTemplate.cs | Migration creating template + template item tables |
| Migrations/20260324200708_AddPaymentGroupTemplate.Designer.cs | Generated migration model metadata |
| DataBase/Models/PaymentGroupTemplateItem.cs | EF model for template item rows |
| DataBase/Models/PaymentGroupTemplate.cs | EF model for template root rows + navigation |
| DataBase/DataBaseContext.cs | Adds DbSets for the new entities |
| Controllers/PaymentGroupTemplateApiController.cs | HTTP endpoints for template CRUD + queries |
| Commands/PaymentGroupTemplate/UpdatePaymentGroupTemplate/UpdatePaymentGroupTemplateCommandHandler.cs | Update logic including validation and item replacement |
| Commands/PaymentGroupTemplate/UpdatePaymentGroupTemplate/UpdatePaymentGroupTemplateCommand.cs | Update command contract |
| Commands/PaymentGroupTemplate/DeletePaymentGroupTemplate/DeletePaymentGroupTemplateCommandHandler.cs | Delete logic for a template |
| Commands/PaymentGroupTemplate/DeletePaymentGroupTemplate/DeletePaymentGroupTemplateCommand.cs | Delete command contract |
| Commands/PaymentGroupTemplate/AddPaymentGroupTemplate/AddPaymentGroupTemplateCommandHandler.cs | Add logic including name uniqueness + payment type validation |
| Commands/PaymentGroupTemplate/AddPaymentGroupTemplate/AddPaymentGroupTemplateCommand.cs | Add command contract |
Files not reviewed (1)
- Migrations/20260324200708_AddPaymentGroupTemplate.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ntGroupTemplateCommandHandler.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ePaymentGroupTemplateCommandHandler.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ntGroupTemplateCommandHandler.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ePaymentGroupTemplateCommandHandler.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ePaymentGroupTemplateCommandHandler.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ePaymentGroupTemplateCommandHandler.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.