40 lines
1.4 KiB
C#
40 lines
1.4 KiB
C#
using System.Text.Json.Serialization;
|
|
using Luski.Shared.PublicServers.V1.Enums;
|
|
|
|
namespace Luski.Shared.PublicServers.V1.ServerToClient.HTTP;
|
|
|
|
public class RoleSTC : STC
|
|
{
|
|
[JsonInclude]
|
|
[JsonPropertyName("id")]
|
|
public long ID { get; set; }
|
|
[JsonInclude]
|
|
[JsonPropertyName("display_name")]
|
|
public string DisplayName { get; set; } = string.Empty;
|
|
[JsonInclude]
|
|
[JsonPropertyName("index")]
|
|
public int Index { get; set; }
|
|
[JsonInclude]
|
|
[JsonPropertyName("color_type")]
|
|
public ColorType ColorType { get; set; } = ColorType.Full;
|
|
[JsonInclude]
|
|
[JsonPropertyName("color")]
|
|
public string Color { get; set; } = string.Empty;
|
|
[JsonInclude]
|
|
[JsonPropertyName("description")]
|
|
public string Description { get; set; } = string.Empty;
|
|
[JsonInclude]
|
|
[JsonPropertyName("server_permissions")]
|
|
public ServerPermission ServerPermissions { get; set; } = ServerPermission.None;
|
|
[JsonInclude]
|
|
[JsonPropertyName("members_list")]
|
|
public long[] Members { get; set; } = Array.Empty<long>();
|
|
}
|
|
|
|
[JsonSerializable(typeof(RoleSTC))]
|
|
[JsonSourceGenerationOptions(
|
|
GenerationMode = JsonSourceGenerationMode.Default,
|
|
PropertyNamingPolicy = JsonKnownNamingPolicy.Unspecified,
|
|
WriteIndented = false,
|
|
DefaultIgnoreCondition = JsonIgnoreCondition.Never)]
|
|
public partial class RoleSTCContext : JsonSerializerContext; |