Add paginated user retrieval functionality in AdminController and related services. Implemented UsersFilter for filtering user queries and added LastConnectionDate property to User model. Updated database schema and frontend API to support new user management features.
This commit is contained in:
@@ -42,6 +42,47 @@ public class PaginatedBundleBacktestRequestsResponse
|
||||
public bool HasPreviousPage { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Response model for paginated users
|
||||
/// </summary>
|
||||
public class PaginatedUsersResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// The list of users for the current page
|
||||
/// </summary>
|
||||
public IEnumerable<UserListItemResponse> Users { get; set; } = new List<UserListItemResponse>();
|
||||
|
||||
/// <summary>
|
||||
/// Total number of users across all pages
|
||||
/// </summary>
|
||||
public int TotalCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Current page number
|
||||
/// </summary>
|
||||
public int CurrentPage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of items per page
|
||||
/// </summary>
|
||||
public int PageSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Total number of pages
|
||||
/// </summary>
|
||||
public int TotalPages { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether there are more pages available
|
||||
/// </summary>
|
||||
public bool HasNextPage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether there are previous pages available
|
||||
/// </summary>
|
||||
public bool HasPreviousPage { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Response model for a bundle backtest request list item (summary view)
|
||||
/// </summary>
|
||||
@@ -65,4 +106,19 @@ public class BundleBacktestRequestListItemResponse
|
||||
public int? EstimatedTimeRemainingSeconds { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Response model for a user list item (summary view)
|
||||
/// </summary>
|
||||
public class UserListItemResponse
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string AgentName { get; set; } = string.Empty;
|
||||
public string AvatarUrl { get; set; } = string.Empty;
|
||||
public string TelegramChannel { get; set; } = string.Empty;
|
||||
public string OwnerWalletAddress { get; set; } = string.Empty;
|
||||
public bool IsAdmin { get; set; }
|
||||
public DateTimeOffset? LastConnectionDate { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user