void.cat/VoidCat/Model/ApiUser.cs
Kieran 4de977c1dd v5 (#65)
Co-authored-by: Kieran <kieran@harkin.me>
Reviewed-on: Kieran/void.cat#65
2023-05-09 13:56:57 +00:00

52 lines
1.2 KiB
C#

using Newtonsoft.Json;
using VoidCat.Database;
namespace VoidCat.Model;
/// <summary>
/// A user object which can be returned via the API
/// </summary>
public class ApiUser
{
/// <summary>
/// Unique Id of the user
/// </summary>
[JsonConverter(typeof(Base58GuidConverter))]
public Guid Id { get; init; }
/// <summary>
/// Display name
/// </summary>
public string? Name { get; init; }
/// <summary>
/// Avatar
/// </summary>
public string? Avatar { get; init; }
/// <summary>
/// If profile can be viewed by anyone
/// </summary>
public bool PublicProfile { get; init; }
/// <summary>
/// If the users uploads can be viewed by anyone
/// </summary>
public bool PublicUploads { get; init; }
/// <summary>
/// If the account is not email verified
/// </summary>
public bool? NeedsVerification { get; init; }
/// <summary>
/// A list of roles the user has
/// </summary>
public List<string> Roles { get; init; } = new();
/// <summary>
/// When the account was created
/// </summary>
public DateTime Created { get; init; }
}