From 21cf6a046b3e279c0694594f40e33daaa4d863f7 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 2 Feb 2021 18:59:41 +0800 Subject: ... --- BackEnd/Timeline/Models/Http/HttpUser.cs | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 BackEnd/Timeline/Models/Http/HttpUser.cs (limited to 'BackEnd/Timeline/Models/Http/HttpUser.cs') diff --git a/BackEnd/Timeline/Models/Http/HttpUser.cs b/BackEnd/Timeline/Models/Http/HttpUser.cs new file mode 100644 index 00000000..4b82264c --- /dev/null +++ b/BackEnd/Timeline/Models/Http/HttpUser.cs @@ -0,0 +1,46 @@ +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 + } +} -- cgit v1.2.3