111 lines
3.4 KiB
C#
111 lines
3.4 KiB
C#
namespace SampleWebApi.Models;
|
|
|
|
public class BulkUpdateResult
|
|
{
|
|
public string OperationId { get; set; } = "";
|
|
public int TotalProducts { get; set; }
|
|
public int UpdatedProducts { get; set; }
|
|
public int FailedProducts { get; set; }
|
|
public bool Completed { get; set; }
|
|
public string? CheckpointId { get; set; }
|
|
public int TotalProcessed { get; set; }
|
|
public int SuccessCount { get; set; }
|
|
public int FailureCount { get; set; }
|
|
public TimeSpan Duration { get; set; }
|
|
public List<string> Errors { get; set; } = new();
|
|
}
|
|
|
|
public class ReportRequest
|
|
{
|
|
public DateTime StartDate { get; set; }
|
|
public DateTime EndDate { get; set; }
|
|
public List<string> MetricsToInclude { get; set; } = new();
|
|
public bool IncludeDetailedBreakdown { get; set; }
|
|
}
|
|
|
|
public class ReportResult
|
|
{
|
|
public string ReportId { get; set; } = "";
|
|
public DateTime GeneratedAt { get; set; }
|
|
public Dictionary<string, object> Metrics { get; set; } = new();
|
|
public List<CategoryBreakdown> CategoryBreakdowns { get; set; } = new();
|
|
public List<CustomerActivity> TopCustomers { get; set; } = new();
|
|
public List<ProductPerformance> TopProducts { get; set; } = new();
|
|
public bool Completed { get; set; }
|
|
public double ProgressPercent { get; set; }
|
|
public long ProcessingTimeMs { get; set; }
|
|
public long MemoryUsedMB { get; set; }
|
|
}
|
|
|
|
public class CategoryBreakdown
|
|
{
|
|
public string Category { get; set; } = "";
|
|
public decimal Revenue { get; set; }
|
|
public int OrderCount { get; set; }
|
|
public decimal AverageOrderValue { get; set; }
|
|
}
|
|
|
|
public class CustomerActivity
|
|
{
|
|
public string CustomerId { get; set; } = "";
|
|
public string CustomerName { get; set; } = "";
|
|
public decimal TotalSpent { get; set; }
|
|
public int OrderCount { get; set; }
|
|
}
|
|
|
|
public class ProductPerformance
|
|
{
|
|
public int ProductId { get; set; }
|
|
public string ProductName { get; set; } = "";
|
|
public decimal Revenue { get; set; }
|
|
public int QuantitySold { get; set; }
|
|
}
|
|
|
|
public class PatternAnalysisRequest
|
|
{
|
|
public string PatternType { get; set; } = "";
|
|
public DateTime StartDate { get; set; }
|
|
public DateTime EndDate { get; set; }
|
|
public Dictionary<string, object> Parameters { get; set; } = new();
|
|
public int MaxOrdersToAnalyze { get; set; } = 100000;
|
|
public bool IncludeCustomerSegmentation { get; set; }
|
|
public bool IncludeSeasonalAnalysis { get; set; }
|
|
}
|
|
|
|
public class PatternResult
|
|
{
|
|
public string Pattern { get; set; } = "";
|
|
public double Confidence { get; set; }
|
|
public Dictionary<string, object> Data { get; set; } = new();
|
|
}
|
|
|
|
public class MemoryStats
|
|
{
|
|
public long CurrentMemoryUsageMB { get; set; }
|
|
public long PeakMemoryUsageMB { get; set; }
|
|
public int ExternalSortOperations { get; set; }
|
|
public int CheckpointsSaved { get; set; }
|
|
public long DataSpilledToDiskMB { get; set; }
|
|
public double CacheHitRate { get; set; }
|
|
public string CurrentMemoryPressure { get; set; } = "";
|
|
}
|
|
|
|
public class BulkPriceUpdateRequest
|
|
{
|
|
public string? CategoryFilter { get; set; }
|
|
public decimal PriceMultiplier { get; set; }
|
|
}
|
|
|
|
public class OrderAggregate
|
|
{
|
|
public DateTime Hour { get; set; }
|
|
public int OrderCount { get; set; }
|
|
public decimal TotalRevenue { get; set; }
|
|
public int UniqueCustomers { get; set; }
|
|
}
|
|
|
|
public class MemoryOptions
|
|
{
|
|
public int MaxMemoryMB { get; set; } = 512;
|
|
public int WarningThresholdPercent { get; set; } = 80;
|
|
} |