using System.Collections.Generic; using System.Linq; using InABox.Integration.Awg; namespace InABox.Integration.Logikal { public interface ILogikalPartsResponse : IAwgBOM where TGroup : ILogikalProductGroup where TFinish : ILogikalFinish where TProfile : ILogikalProfile where TGasket : ILogikalGasket where TComponent : ILogikalComponent where TGlass : ILogikalGlass where TLabour : ILogikalLabour { byte[] ExcelData { get; set; } byte[] SQLiteData { get; set; } } public abstract class AbstractLogikalPartsResponse : LogikalResponse, ILogikalPartsResponse where TGroup : ILogikalProductGroup where TFinish : ILogikalFinish where TProfile : ILogikalProfile where TGasket : ILogikalGasket where TComponent : ILogikalComponent where TGlass : ILogikalGlass where TLabour : ILogikalLabour { public IEnumerable Groups { get; set; } public IEnumerable Finishes { get; set; } public IEnumerable Profiles { get; set; } public IEnumerable Gaskets { get; set; } public IEnumerable Components { get; set; } public IEnumerable Glass { get; set; } public IEnumerable Labour { get; set; } public byte[] ExcelData { get; set; } public byte[] SQLiteData { get; set; } public override string ToString() => $"{Finishes?.Count() ?? 0} Finishes / {Profiles?.Count() ?? 0} Profiles / {Gaskets?.Count() ?? 0} Gaskets / {Components?.Count() ?? 0} Components / {Glass?.Count() ?? 0} Glass/ {Labour?.Count() ?? 0} Activities found"; } }