Add avatar support

This commit is contained in:
Holden
2026-06-20 15:33:46 -05:00
parent 942bb4c80b
commit e24a4c6872
15 changed files with 365 additions and 9 deletions

View File

@@ -35,6 +35,8 @@ public class Profile
public DateTimeOffset CreatedAt { get; private set; }
public Avatar Avatar { get; private set; } = Avatar.Empty;
public static Profile Create(
string name,
PlatformType platform,
@@ -81,6 +83,9 @@ public class Profile
public void RevokeModerator()
=> IsModerator = false;
public void SetAvatar(Avatar avatar)
=> Avatar = avatar ?? throw new DomainException("Avatar is required.");
private static string RequireValue(string value, string parameterName)
=> !string.IsNullOrWhiteSpace(value) ? value : throw new DomainException($"{parameterName} is required.");
}