Skip to content

Gu financial institutions#17

Merged
RafaelKC merged 8 commits intomainfrom
gu-financial-institutions
Oct 7, 2025
Merged

Gu financial institutions#17
RafaelKC merged 8 commits intomainfrom
gu-financial-institutions

Conversation

@Passossss
Copy link
Copy Markdown
Collaborator

Gu financial institutions

@Passossss Passossss requested review from RafaelKC and Copilot October 6, 2025 19:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a Financial Institutions feature to the Fin application, adding complete CRUD functionality for managing financial institutions with proper database schema and API endpoints.

  • Added FinancialInstitution domain entity with related DTOs and enums
  • Created database migrations and Entity Framework configuration
  • Implemented service layer with validation and business logic
  • Added REST API controller with admin authorization

Reviewed Changes

Copilot reviewed 14 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Fin.Domain/FinancialInstitutions/ Domain models, DTOs, and enums for financial institutions
Fin.Infrastructure/Database/ Entity configuration and database migrations
Fin.Infrastructure/Seeders/ Updated menu seeder to include financial institutions menu
Fin.Application/FinancialInstitutions/ Business logic service with CRUD operations
Fin.Api/FinancialInstitutions/ REST API controller with authorization
Fin.Api/appsettings.json Configuration file removed entirely
Files not reviewed (2)
  • Fin.Infrastructure/Migrations/20251001194905_AddFinancialInstitutions.Designer.cs: Language not supported
  • Fin.Infrastructure/Migrations/20251003025422_RenameLogoUrlToIcon.Designer.cs: Language not supported
Comments suppressed due to low confidence (2)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Copy Markdown
Collaborator

@RafaelKC RafaelKC left a comment

Choose a reason for hiding this comment

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

Tip: when push a new feature try use ust one migration

}

[HttpPost("{id:guid}/activate")]
[Authorize(Roles = "Admin")]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Instead of "Admin" use AuthenticationRoles.Admin

}

[HttpGet("{id:guid}")]
[Authorize(Roles = "Admin")]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Here don´t need.


[HttpPost("{id:guid}/deactivate")]
[Authorize(Roles = "Admin")]
public async Task<ActionResult> Deactivate([FromRoute] Guid id)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Instead of a active and deactive endpoint you can use a toggler endpoint to follow standards

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

WHY DELETED THIS?

public async Task<PagedOutput<FinancialInstitutionOutput>> GetList(PagedFilteredAndSortedInput input)
{
return await repository.Query(false)
.OrderBy(f => f.Name)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Like in TitleCategory, first order by inactivated prop, than by name

[Required]
public FinancialInstitutionType Type { get; set; }

[MaxLength(50)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Like in front, Where color?


namespace Fin.Domain.FinancialInstitutions.Entities;

public class FinancialInstitution : IAuditedEntity, ITenantEntity
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

NO, is no ITenant

builder.HasIndex(x => new { x.Name, x.TenantId })
.IsUnique();

builder.HasIndex(x => new { x.Code, x.TenantId })
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

NO


builder.Property(x => x.Type)
.IsRequired()
.HasConversion<string>();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We gonna user enum type as int or smallint in db


builder.Property(x => x.Code)
.HasMaxLength(3)
.IsRequired();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Not required

@RafaelKC RafaelKC merged commit 2dfdaf6 into main Oct 7, 2025
1 check 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.

3 participants