namespace TrafagSalesExporter.Models; public class ManagementCockpitFileOption { public string Path { get; set; } = string.Empty; public string DisplayName { get; set; } = string.Empty; public DateTime LastModified { get; set; } } public static class ManagementCockpitValueFieldKeys { public const string SalesPriceValue = nameof(SalesPriceValue); public const string Quantity = nameof(Quantity); public const string StandardCost = nameof(StandardCost); public const string StandardCostTotal = nameof(StandardCostTotal); } public static class ManagementCockpitCurrencyOptions { public const string Native = "NATIVE"; public const string Eur = "EUR"; public const string Usd = "USD"; } public class ManagementCockpitValueFieldOption { public string Key { get; set; } = string.Empty; public string Label { get; set; } = string.Empty; public bool IsCurrencyAmount { get; set; } } public class ManagementCockpitAnalysisOptions { public string ValueField { get; set; } = ManagementCockpitValueFieldKeys.SalesPriceValue; public List AdditionalValueFields { get; set; } = []; public string TargetCurrency { get; set; } = ManagementCockpitCurrencyOptions.Native; public string? LandFilter { get; set; } public string? TscFilter { get; set; } } public class ManagementCockpitSummary { public string Land { get; set; } = string.Empty; public string Tsc { get; set; } = string.Empty; public DateTime? ExtractionDate { get; set; } public int RowCount { get; set; } public int InvoiceCount { get; set; } public int CustomerCount { get; set; } public string ValueFieldKey { get; set; } = ManagementCockpitValueFieldKeys.SalesPriceValue; public string ValueFieldLabel { get; set; } = "Sales Price/Value"; public string DisplayCurrency { get; set; } = string.Empty; public int MissingExchangeRateCount { get; set; } public decimal AggregatedValueTotal { get; set; } public decimal SalesValueTotal { get; set; } public decimal EstimatedCostTotal { get; set; } public decimal EstimatedMarginTotal { get; set; } public decimal EstimatedMarginPercent { get; set; } public decimal ServiceSharePercent { get; set; } public decimal MissingOrderDatePercent { get; set; } public decimal MissingSupplierPercent { get; set; } } public class ManagementCockpitFinding { public string Severity { get; set; } = "Info"; public string Title { get; set; } = string.Empty; public string Detail { get; set; } = string.Empty; } public class ManagementCockpitTopItem { public string Label { get; set; } = string.Empty; public decimal Value { get; set; } public decimal SharePercent { get; set; } } public class ManagementCockpitResult { public string FilePath { get; set; } = string.Empty; public ManagementCockpitSummary Summary { get; set; } = new(); public List Findings { get; set; } = []; public List TopCustomers { get; set; } = []; public List TopProductGroups { get; set; } = []; public List TopSalesEmployees { get; set; } = []; public Dictionary DataQualityCounts { get; set; } = new(StringComparer.OrdinalIgnoreCase); } public class ManagementCockpitCentralFilter { public int Year { get; set; } public int? Month { get; set; } public string ValueField { get; set; } = ManagementCockpitValueFieldKeys.SalesPriceValue; public string TargetCurrency { get; set; } = ManagementCockpitCurrencyOptions.Native; public string? Land { get; set; } public string? Tsc { get; set; } } public class ManagementCockpitCentralSummary { public int RowCount { get; set; } public int InvoiceCount { get; set; } public int SiteCount { get; set; } public int CountryCount { get; set; } public int CurrencyCount { get; set; } public string ValueFieldKey { get; set; } = ManagementCockpitValueFieldKeys.SalesPriceValue; public string ValueFieldLabel { get; set; } = "Sales Price/Value"; public string DisplayCurrency { get; set; } = string.Empty; public decimal ValueTotal { get; set; } public int MissingExchangeRateCount { get; set; } public DateTime? PeriodStart { get; set; } public DateTime? PeriodEnd { get; set; } } public class ManagementCockpitTimeValueRow { public string Label { get; set; } = string.Empty; public int? Year { get; set; } public int? Month { get; set; } public int? Day { get; set; } public string Currency { get; set; } = string.Empty; public decimal SalesValue { get; set; } public Dictionary AdditionalValues { get; set; } = new(StringComparer.OrdinalIgnoreCase); public int RowCount { get; set; } } public class ManagementCockpitAggregatedFieldValue { public string FieldKey { get; set; } = string.Empty; public string Label { get; set; } = string.Empty; public string Currency { get; set; } = string.Empty; public decimal Value { get; set; } public int MissingExchangeRateCount { get; set; } } public class ManagementCockpitDimensionValueRow { public string Label { get; set; } = string.Empty; public string Currency { get; set; } = string.Empty; public decimal SalesValue { get; set; } public int RowCount { get; set; } public int InvoiceCount { get; set; } } public class ManagementCockpitCentralResult { public ManagementCockpitCentralFilter Filter { get; set; } = new(); public ManagementCockpitCentralSummary Summary { get; set; } = new(); public List Notices { get; set; } = []; public List AdditionalValueFields { get; set; } = []; public List YearlyTotals { get; set; } = []; public List MonthlyTotals { get; set; } = []; public List DailyTotals { get; set; } = []; public List SourceSystemTotals { get; set; } = []; public List CountryTotals { get; set; } = []; } public class ManagementFinanceSummaryFilter { public int Year { get; set; } public string? CountryKey { get; set; } public string? Currency { get; set; } } public class ManagementFinanceSummaryRow { public int Year { get; set; } public string CountryKey { get; set; } = string.Empty; public string Currency { get; set; } = string.Empty; public int IncludedRows { get; set; } public int ExcludedRows { get; set; } public decimal NetSalesActual { get; set; } } public class ManagementFinanceCountryStatusRow : ManagementFinanceSummaryRow { public string SourceSystems { get; set; } = string.Empty; public string Tscs { get; set; } = string.Empty; public decimal? ReferenceValue { get; set; } public decimal? Difference { get; set; } public decimal? DifferencePercent { get; set; } public string Status { get; set; } = string.Empty; } public class ManagementFinanceDataStatusRow { public string Land { get; set; } = string.Empty; public string Tsc { get; set; } = string.Empty; public string SourceSystem { get; set; } = string.Empty; public bool IsActive { get; set; } public int RowCount { get; set; } public DateTime? LatestStoredAtUtc { get; set; } public DateTime? LatestExtractionDate { get; set; } public DateTime? LatestExportAt { get; set; } public string LatestExportStatus { get; set; } = string.Empty; public string ManualImportFilePath { get; set; } = string.Empty; public DateTime? ManualImportLastUploadedAtUtc { get; set; } } public class ManagementFinanceCreditCandidateRow { public string CountryKey { get; set; } = string.Empty; public string Tsc { get; set; } = string.Empty; public string InvoiceNumber { get; set; } = string.Empty; public string DocumentType { get; set; } = string.Empty; public string Currency { get; set; } = string.Empty; public decimal NetSalesActual { get; set; } public decimal Quantity { get; set; } public string Reason { get; set; } = string.Empty; } public class ManagementFinanceDataQualityRow { public string Issue { get; set; } = string.Empty; public int Count { get; set; } public string Severity { get; set; } = "Info"; } public class ManagementFinanceSummaryResult { public ManagementFinanceSummaryFilter Filter { get; set; } = new(); public List Notices { get; set; } = []; public List YearOptions { get; set; } = []; public List CountryOptions { get; set; } = []; public List CurrencyOptions { get; set; } = []; public List Rows { get; set; } = []; public List YearRows { get; set; } = []; public int IncludedRows { get; set; } public int ExcludedRows { get; set; } public int CountryCount { get; set; } public int CurrencyCount { get; set; } public decimal NetSalesActual { get; set; } public string DisplayCurrency { get; set; } = string.Empty; public List CountryRows { get; set; } = []; public List DeviationRows { get; set; } = []; public List DataStatusRows { get; set; } = []; public List CreditCandidates { get; set; } = []; public List DataQualityRows { get; set; } = []; }