Add AnalyticsController with endpoints for tracking material consumption: - /analytics/material-usage - usage summary with optional monthly grouping - /analytics/plate-sizes - commonly used plate size analysis - /analytics/thickness-breakdown - consumption by material thickness - /analytics/customer-usage - material breakdown per customer - /analytics/stock-recommendations - stock level suggestions based on history - /analytics/top-materials - quick summary of most used materials 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
62 lines
1.9 KiB
C#
62 lines
1.9 KiB
C#
namespace PepApi.Core.Models;
|
|
|
|
public class MaterialUsageSummary
|
|
{
|
|
public int MaterialNumber { get; set; }
|
|
public required string MaterialGrade { get; set; }
|
|
public double Thickness { get; set; }
|
|
public int NestCount { get; set; }
|
|
public int PlateCount { get; set; }
|
|
public double TotalWeight { get; set; }
|
|
public double TotalArea { get; set; }
|
|
}
|
|
|
|
public class MaterialUsageByPeriod
|
|
{
|
|
public int Year { get; set; }
|
|
public int Month { get; set; }
|
|
public required List<MaterialUsageSummary> Materials { get; set; }
|
|
}
|
|
|
|
public class PlateSizeUsage
|
|
{
|
|
public required string PlateSize { get; set; }
|
|
public double Length { get; set; }
|
|
public double Width { get; set; }
|
|
public int Count { get; set; }
|
|
public double TotalWeight { get; set; }
|
|
public double TotalArea { get; set; }
|
|
public double PercentageOfTotal { get; set; }
|
|
}
|
|
|
|
public class ThicknessBreakdown
|
|
{
|
|
public double Thickness { get; set; }
|
|
public int NestCount { get; set; }
|
|
public int PlateCount { get; set; }
|
|
public double TotalWeight { get; set; }
|
|
public double PercentageOfTotal { get; set; }
|
|
public required List<string> MaterialGrades { get; set; }
|
|
}
|
|
|
|
public class CustomerMaterialUsage
|
|
{
|
|
public required string CustomerName { get; set; }
|
|
public required List<MaterialUsageSummary> Materials { get; set; }
|
|
public double TotalWeight { get; set; }
|
|
public int TotalNests { get; set; }
|
|
}
|
|
|
|
public class StockRecommendation
|
|
{
|
|
public int MaterialNumber { get; set; }
|
|
public required string MaterialGrade { get; set; }
|
|
public double Thickness { get; set; }
|
|
public required string RecommendedPlateSize { get; set; }
|
|
public double AverageMonthlyWeight { get; set; }
|
|
public double AverageMonthlyPlates { get; set; }
|
|
public int MonthsAnalyzed { get; set; }
|
|
public double SuggestedStockWeight { get; set; }
|
|
public int SuggestedStockPlates { get; set; }
|
|
}
|