mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-07-12 16:03:27 +08:00
feat(picture): update Username property to return default value for null or empty usernames
This commit is contained in:
@@ -15,7 +15,12 @@ public record PictureResponse
|
|||||||
public DateTime? TakenAt { get; set; }
|
public DateTime? TakenAt { get; set; }
|
||||||
public ExifInfo? ExifInfo { get; set; }
|
public ExifInfo? ExifInfo { get; set; }
|
||||||
public int? UserId { get; set; }
|
public int? UserId { get; set; }
|
||||||
public string? Username { get; set; }
|
private string? _username;
|
||||||
|
public string? Username
|
||||||
|
{
|
||||||
|
get => string.IsNullOrEmpty(_username) ? "匿名" : _username;
|
||||||
|
set => _username = value;
|
||||||
|
}
|
||||||
public bool IsFavorited { get; set; }
|
public bool IsFavorited { get; set; }
|
||||||
public int FavoriteCount { get; set; }
|
public int FavoriteCount { get; set; }
|
||||||
public int? AlbumId { get; set; }
|
public int? AlbumId { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user