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