Update account/position and platform summary

This commit is contained in:
2025-09-26 01:18:59 +07:00
parent b2e38811ed
commit bcfeb693ce
32 changed files with 3301 additions and 151 deletions

View File

@@ -5,6 +5,7 @@ namespace Managing.Application.Abstractions.Repositories;
public interface IAccountRepository
{
Task<Account> GetAccountByNameAsync(string name);
Task<Account> GetAccountByIdAsync(int id);
Task<Account> GetAccountByKeyAsync(string key);
Task InsertAccountAsync(Account account);
Task UpdateAccountAsync(Account account);

View File

@@ -24,6 +24,15 @@ public interface IAccountService
/// <returns>The found account or null if not found</returns>
Task<Account> GetAccountByAccountName(string accountName, bool hideSecrets = true, bool getBalance = false);
/// <summary>
/// Gets an account by ID directly from the repository.
/// </summary>
/// <param name="accountId">The ID of the account to find</param>
/// <param name="hideSecrets">Whether to hide sensitive information</param>
/// <param name="getBalance">Whether to fetch the current balance</param>
/// <returns>The found account or null if not found</returns>
Task<Account> GetAccountById(int accountId, bool hideSecrets = true, bool getBalance = false);
IEnumerable<Account> GetAccountsBalancesByUser(User user, bool hideSecrets = true);
Task<IEnumerable<Account>> GetAccountsBalancesByUserAsync(User user, bool hideSecrets = true);
Task<GmxClaimableSummary> GetGmxClaimableSummaryAsync(User user, string accountName);