mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-07-20 03:52:18 +08:00
feat(userManagement): add user detail view and filtering capabilities
This commit is contained in:
@@ -5,14 +5,13 @@ namespace Foxel.Models.DataBase;
|
||||
|
||||
public class Favorite
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
public User User { get; set; }
|
||||
|
||||
[Key] public int Id { get; set; }
|
||||
|
||||
public int UserId { get; set; }
|
||||
[ForeignKey("UserId")] public User User { get; set; }
|
||||
|
||||
public int PictureId { get; set; }
|
||||
[ForeignKey("PictureId")]
|
||||
public Picture Picture { get; set; }
|
||||
|
||||
[ForeignKey("PictureId")] public Picture Picture { get; set; }
|
||||
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
}
|
||||
21
Models/Response/User/UserDetailResponse.cs
Normal file
21
Models/Response/User/UserDetailResponse.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace Foxel.Models.Response.User;
|
||||
|
||||
public class UserDetailResponse
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
public string Email { get; set; } = string.Empty;
|
||||
public string Role { get; set; } = string.Empty;
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public UserStatistics Statistics { get; set; } = new();
|
||||
}
|
||||
|
||||
public class UserStatistics
|
||||
{
|
||||
public int TotalPictures { get; set; }
|
||||
public int TotalAlbums { get; set; }
|
||||
public int TotalFavorites { get; set; }
|
||||
public int FavoriteReceivedCount { get; set; }
|
||||
public double DiskUsageMB { get; set; }
|
||||
public int AccountAgeDays { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user