-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from Star-Academy/refactor/refactor-account-apis
refactor: refactor account related parts
- Loading branch information
Showing
24 changed files
with
258 additions
and
240 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace Application.DTOs.Account; | ||
|
||
public class AccountCsvModel | ||
{ | ||
public long AccountId { get; set; } | ||
public long CardId { get; set; } | ||
public string Iban { get; set; } = string.Empty; | ||
public string AccountType { get; set; } = string.Empty; | ||
public string BranchTelephone { get; set; } = string.Empty; | ||
public string BranchAddress { get; set; } = string.Empty; | ||
public string BranchName { get; set; } = string.Empty; | ||
public string OwnerName { get; set; } = string.Empty; | ||
public string OwnerLastName { get; set; } = string.Empty; | ||
public string OwnerId { get; set; } = string.Empty; | ||
} |
2 changes: 1 addition & 1 deletion
2
...DTOs/AccountCsv/GetAllAccountsResponse.cs → ...on/DTOs/Account/GetAllAccountsResponse.cs
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...lication/Interfaces/IAccountRepository.cs → ...rfaces/Repositories/IAccountRepository.cs
This file contains 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
6 changes: 6 additions & 0 deletions
6
src/Application/Interfaces/Repositories/IRoleManagerRepository.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Application.Interfaces.Repositories; | ||
|
||
public interface IRoleManagerRepository | ||
{ | ||
Task<bool> RoleExistsAsync(string roleName); | ||
} |
16 changes: 8 additions & 8 deletions
16
...tion/Interfaces/ITransactionRepository.cs → ...es/Repositories/ITransactionRepository.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
using Domain.Entities; | ||
|
||
namespace Application.Interfaces; | ||
|
||
public interface ITransactionRepository | ||
{ | ||
Task CreateBulkAsync(List<Transaction> transactions); | ||
Task<List<Transaction>> GetAllTransactions(); | ||
using Domain.Entities; | ||
|
||
namespace Application.Interfaces.Repositories; | ||
|
||
public interface ITransactionRepository | ||
{ | ||
Task CreateBulkAsync(List<Transaction> transactions); | ||
Task<List<Transaction>> GetAllTransactions(); | ||
} |
35 changes: 17 additions & 18 deletions
35
src/Application/Interfaces/IUserManager.cs → ...es/Repositories/IUserManagerRepository.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
using Application.DTOs; | ||
using Domain.Entities; | ||
using Microsoft.AspNetCore.Identity; | ||
|
||
namespace Application.Interfaces; | ||
|
||
public interface IUserManager | ||
{ | ||
Task<IdentityResult> CreateAsync(AppUser user, string password); | ||
Task<IdentityResult> SetRoleAsync(AppUser user, string role); | ||
Task<IdentityResult> ChangeRoleAsync(AppUser user, string newRole); | ||
Task<AppUser?> FindByNameAsync(string userName); | ||
Task<AppUser?> FindByEmailAsync(string email); | ||
Task<AppUser?> FindByIdAsync(string userId); | ||
Task<IdentityResult> UpdateAsync(AppUser user); | ||
Task<IdentityResult> ChangePasswordAsync(AppUser user, string currentPassword, string newPassword); | ||
Task<string> GetRoleAsync(AppUser user); | ||
Task<bool> CheckPasswordAsync(AppUser user, string password); | ||
using Domain.Entities; | ||
using Microsoft.AspNetCore.Identity; | ||
|
||
namespace Application.Interfaces.Repositories; | ||
|
||
public interface IUserManagerRepository | ||
{ | ||
Task<IdentityResult> CreateAsync(AppUser user, string password); | ||
Task<IdentityResult> SetRoleAsync(AppUser user, string role); | ||
Task<IdentityResult> ChangeRoleAsync(AppUser user, string newRole); | ||
Task<AppUser?> FindByNameAsync(string userName); | ||
Task<AppUser?> FindByEmailAsync(string email); | ||
Task<AppUser?> FindByIdAsync(string userId); | ||
Task<IdentityResult> UpdateAsync(AppUser user); | ||
Task<IdentityResult> ChangePasswordAsync(AppUser user, string currentPassword, string newPassword); | ||
Task<string> GetRoleAsync(AppUser user); | ||
Task<bool> CheckPasswordAsync(AppUser user, string password); | ||
} |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.