Uwaa/Pleroma/Models/AccountInfo.cs
2025-01-04 14:54:59 +00:00

63 lines
No EOL
1.5 KiB
C#

namespace Uwaa.Pleroma;
/// <summary>
/// Admin information about an account.
/// </summary>
public class AccountInfo : ASObject
{
[JsonPropertyName("actor_type")]
[JsonConverter(typeof(EnumLowerCaseConverter<ActorType>))]
public ActorType Type { get; set; }
[JsonPropertyName("avatar")]
public string Avatar { get; set; } = null!;
[JsonPropertyName("display_name")]
public string DisplayName { get; set; } = null!;
[JsonPropertyName("email")]
public string? Email { get; set; }
[JsonPropertyName("is_active")]
public bool IsActive { get; set; }
[JsonPropertyName("is_approved")]
public bool IsApproved { get; set; }
[JsonPropertyName("is_confirmed")]
public bool IsConfirmed { get; set; }
[JsonPropertyName("local")]
public bool Local { get; set; }
[JsonPropertyName("nickname")]
public string Nickname { get; set; } = null!;
[JsonPropertyName("registration_reason")]
public string? RegistrationReason { get; set; }
[JsonPropertyName("roles")]
public AccountRoles Roles { get; set; } = null!;
[JsonPropertyName("url")]
public string URL { get; set; } = null!;
[JsonPropertyName("tags")]
public string[] Tags { get; set; } = null!;
[JsonConstructor()]
internal AccountInfo()
{
}
public override string ToString() => $"@{Nickname}";
}
public class AccountRoles
{
[JsonPropertyName("admin")]
public bool Admin { get; set; }
[JsonPropertyName("moderator")]
public bool Moderator { get; set; }
}