2022-06-17 14:11:44 -04:00
|
|
|
|
using System;
|
|
|
|
|
using Newtonsoft.Json;
|
2020-09-26 18:17:21 -04:00
|
|
|
|
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>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
/// Config driven command properties
|
2020-01-26 19:06:50 -05:00
|
|
|
|
/// </summary>
|
|
|
|
|
public class CommandProperties
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
/// Specifies the command name
|
2020-01-26 19:06:50 -05:00
|
|
|
|
/// </summary>
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
/// Alias of this command
|
2020-01-26 19:06:50 -05:00
|
|
|
|
/// </summary>
|
|
|
|
|
public string Alias { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
/// Specifies the minimum permission level needed to execute the
|
2020-01-26 19:06:50 -05:00
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
|
|
|
public Permission MinimumPermission { get; set; }
|
2020-04-26 22:12:49 -04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
/// Indicates if the command can be run by another user (impersonation)
|
2020-04-26 22:12:49 -04:00
|
|
|
|
/// </summary>
|
|
|
|
|
public bool AllowImpersonation { get; set; }
|
2020-09-26 18:17:21 -04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
/// Specifies the games supporting the functionality of the command
|
2020-09-26 18:17:21 -04:00
|
|
|
|
/// </summary>
|
|
|
|
|
[JsonProperty(ItemConverterType = typeof(StringEnumConverter))]
|
2022-06-17 14:11:44 -04:00
|
|
|
|
public Game[] SupportedGames { get; set; } = Array.Empty<Game>();
|
2020-01-26 19:06:50 -05:00
|
|
|
|
}
|
2022-06-17 14:11:44 -04:00
|
|
|
|
}
|