using System.Collections.Generic;
namespace Timeline.Models.Http
{
///
/// Info of a user.
///
public class HttpUser
{
public HttpUser() { }
public HttpUser(string uniqueId, string username, string nickname, List permissions, HttpUserLinks links)
{
UniqueId = uniqueId;
Username = username;
Nickname = nickname;
Permissions = permissions;
_links = links;
}
///
/// Unique id.
///
public string UniqueId { get; set; } = default!;
///
/// Username.
///
public string Username { get; set; } = default!;
///
/// Nickname.
///
public string Nickname { get; set; } = default!;
#pragma warning disable CA2227 // Collection properties should be read only
///
/// The permissions of the user.
///
public List Permissions { get; set; } = default!;
#pragma warning restore CA2227 // Collection properties should be read only
#pragma warning disable CA1707 // Identifiers should not contain underscores
///
/// Related links.
///
public HttpUserLinks _links { get; set; } = default!;
#pragma warning restore CA1707 // Identifiers should not contain underscores
}
///
/// Related links for user.
///
public class HttpUserLinks
{
public HttpUserLinks() { }
public HttpUserLinks(string self, string avatar, string timeline)
{
Self = self;
Avatar = avatar;
Timeline = timeline;
}
///
/// Self.
///
public string Self { get; set; } = default!;
///
/// Avatar url.
///
public string Avatar { get; set; } = default!;
///
/// Personal timeline url.
///
public string Timeline { get; set; } = default!;
}
}