2022-09-08 16:03:38 -04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using Data.Models.Client;
|
|
|
|
|
using SharedLibraryCore.Interfaces;
|
2022-10-12 22:06:18 -04:00
|
|
|
|
using InteractionCallback = System.Func<int, int?, Data.Models.Reference.Game?, System.Collections.Generic.IDictionary<string,string>, System.Threading.CancellationToken, System.Threading.Tasks.Task<string>>;
|
2022-09-08 16:03:38 -04:00
|
|
|
|
|
|
|
|
|
namespace SharedLibraryCore.Helpers;
|
|
|
|
|
|
|
|
|
|
public class InteractionData : IInteractionData
|
|
|
|
|
{
|
|
|
|
|
public int? EntityId { get; set; }
|
2022-10-17 10:17:43 -04:00
|
|
|
|
public string InteractionId { get; set; }
|
|
|
|
|
public InteractionType InteractionType { get; set; }
|
2022-09-08 16:03:38 -04:00
|
|
|
|
public bool Enabled { get; set; }
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
public string DisplayMeta { get; set; }
|
|
|
|
|
public string ActionPath { get; set; }
|
|
|
|
|
public Dictionary<string, string> ActionMeta { get; set; } = new();
|
|
|
|
|
public string ActionUri => ActionPath + "?" + string.Join('&', ActionMeta.Select(kvp => $"{kvp.Key}={kvp.Value}"));
|
|
|
|
|
public EFClient.Permission? MinimumPermission { get; set; }
|
|
|
|
|
public string PermissionEntity { get; set; } = "Interaction";
|
|
|
|
|
public string PermissionAccess { get; set; } = "Read";
|
|
|
|
|
public string Source { get; set; }
|
|
|
|
|
public InteractionCallback Action { get; set; }
|
|
|
|
|
public Delegate ScriptAction { get; set; }
|
|
|
|
|
}
|