Skip to content

add payment file entity & api#147

Merged
bodynar merged 8 commits into
developfrom
feature/attach_file
Mar 21, 2026
Merged

add payment file entity & api#147
bodynar merged 8 commits into
developfrom
feature/attach_file

Conversation

@bodynar

@bodynar bodynar commented Mar 21, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class “payment file” support to the MAS.Payments API by introducing a PaymentFile entity with persistence, CQRS commands/queries, and HTTP endpoints for upload/download/list/delete.

Changes:

  • Add PaymentFile EF model + DB migration (table, constraints, 1:1 links to Payment or PaymentGroup).
  • Add queries to list files and fetch a single file payload.
  • Add commands + API controller endpoints to upload and delete files (single and bulk).

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
Queries/PaymentFiles/GetPaymentFiles/GetPaymentFilesResponse.cs DTO for listing uploaded files and their linkage metadata.
Queries/PaymentFiles/GetPaymentFiles/GetPaymentFilesQueryHandler.cs Query handler to return file list ordered by upload time.
Queries/PaymentFiles/GetPaymentFiles/GetPaymentFilesQuery.cs Query contract for listing payment files.
Queries/PaymentFiles/GetPaymentFile/GetPaymentFileResponse.cs DTO for returning a file payload (name/type/data).
Queries/PaymentFiles/GetPaymentFile/GetPaymentFileQueryHandler.cs Query handler to fetch a single file by id.
Queries/PaymentFiles/GetPaymentFile/GetPaymentFileQuery.cs Query contract for fetching a single file.
Models/DeleteRecordsRequest.cs Request model for bulk delete.
Migrations/DataBaseContextModelSnapshot.cs EF snapshot updated to include PaymentFile entity mapping/constraints.
Migrations/20260321171303_AddPaymentFile.cs Migration creating PaymentFile table, constraints, and indexes.
Migrations/20260321171303_AddPaymentFile.Designer.cs EF designer output for the migration target model.
DataBase/Models/PaymentFile.cs New PaymentFile entity (binary payload + FK to Payment/PaymentGroup).
DataBase/DataBaseContext.cs Registers DbSet<PaymentFile> and configures relationships/indexes/check constraint.
Controllers/PaymentFileApiController.cs New API endpoints for upload, download/view, list, and delete.
Commands/PaymentFile/UploadPaymentFile/UploadPaymentFileCommandHandler.cs Validates linkage rules and creates PaymentFile records.
Commands/PaymentFile/UploadPaymentFile/UploadPaymentFileCommand.cs Command contract for uploading file content.
Commands/PaymentFile/DeletePaymentFiles/DeletePaymentFilesCommandHandler.cs Bulk delete handler by id list.
Commands/PaymentFile/DeletePaymentFiles/DeletePaymentFilesCommand.cs Command contract for bulk deletion.
Commands/PaymentFile/DeletePaymentFile/DeletePaymentFileCommandHandler.cs Single delete handler by id.
Commands/PaymentFile/DeletePaymentFile/DeletePaymentFileCommand.cs Command contract for single deletion.
Files not reviewed (1)
  • Migrations/20260321171303_AddPaymentFile.Designer.cs: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Models/DeleteRecordsRequest.cs Outdated
Comment thread Controllers/PaymentFileApiController.cs
Comment thread Controllers/PaymentFileApiController.cs Outdated
Comment thread Controllers/PaymentFileApiController.cs Outdated
Comment thread Controllers/PaymentFileApiController.cs
Comment thread Controllers/PaymentFileApiController.cs
bodynar and others added 3 commits March 21, 2026 23:08
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 19 changed files in this pull request and generated 5 comments.

Files not reviewed (1)
  • Migrations/20260321171303_AddPaymentFile.Designer.cs: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Migrations/20260321171303_AddPaymentFile.cs Outdated
Comment thread Controllers/PaymentFileApiController.cs Outdated
Comment thread Controllers/PaymentFileApiController.cs Outdated
Comment thread Controllers/PaymentFileApiController.cs Outdated
bodynar and others added 4 commits March 21, 2026 23:50
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@bodynar bodynar merged commit ae23061 into develop Mar 21, 2026
1 check passed
@bodynar bodynar deleted the feature/attach_file branch March 21, 2026 20:52
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.

2 participants