IW4M-Admin/SharedLibraryCore/Configuration/CommandProperties.cs

40 lines
1.2 KiB
C#
Raw Normal View History

using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using static Data.Models.Client.EFClient;
using static SharedLibraryCore.Server;
namespace SharedLibraryCore.Configuration
{
/// <summary>
2022-01-26 11:32:16 -05:00
/// Config driven command properties
/// </summary>
public class CommandProperties
{
/// <summary>
2022-01-26 11:32:16 -05:00
/// Specifies the command name
/// </summary>
public string Name { get; set; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// Alias of this command
/// </summary>
public string Alias { get; set; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// Specifies the minimum permission level needed to execute the
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public Permission MinimumPermission { get; set; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// Indicates if the command can be run by another user (impersonation)
/// </summary>
public bool AllowImpersonation { get; set; }
/// <summary>
2022-01-26 11:32:16 -05:00
/// Specifies the games supporting the functionality of the command
/// </summary>
[JsonProperty(ItemConverterType = typeof(StringEnumConverter))]
public Game[] SupportedGames { get; set; } = new Game[0];
}
2022-01-26 11:32:16 -05:00
}