Supporto PostgreSQL, statistiche avanzate e nuova UI
Aggiornamento massivo: aggiunto backend PostgreSQL per statistiche aste con fallback SQLite, nuovi modelli e servizi, UI moderna con grafici interattivi, refactoring stato applicazione (ApplicationStateService), documentazione completa per deploy Docker/Unraid/Gitea, nuovi CSS e script JS per UX avanzata, template Unraid, test database, e workflow CI/CD estesi. Pronto per produzione e analisi avanzate.
This commit is contained in:
@@ -26,6 +26,11 @@ namespace AutoBidder.Models
|
||||
// Latenza polling
|
||||
public int PollingLatencyMs { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero di puntate effettuate dall'utente su questa asta (da API)
|
||||
/// </summary>
|
||||
public int? MyBidsCount { get; set; }
|
||||
|
||||
// Dati estratti HTML
|
||||
public string RawHtml { get; set; } = "";
|
||||
public bool ParsingSuccess { get; set; } = true;
|
||||
|
||||
100
Mimante/Models/PostgresModels.cs
Normal file
100
Mimante/Models/PostgresModels.cs
Normal file
@@ -0,0 +1,100 @@
|
||||
using System;
|
||||
|
||||
namespace AutoBidder.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Modello per asta conclusa con dettagli completi
|
||||
/// </summary>
|
||||
public class CompletedAuction
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string AuctionId { get; set; } = "";
|
||||
public string ProductName { get; set; } = "";
|
||||
public decimal FinalPrice { get; set; }
|
||||
public decimal? BuyNowPrice { get; set; }
|
||||
public decimal? ShippingCost { get; set; }
|
||||
public int TotalBids { get; set; }
|
||||
public int MyBidsCount { get; set; }
|
||||
public int ResetCount { get; set; }
|
||||
public bool Won { get; set; }
|
||||
public string? WinnerUsername { get; set; }
|
||||
public DateTime CompletedAt { get; set; }
|
||||
public int? DurationSeconds { get; set; }
|
||||
public decimal? AverageLatency { get; set; }
|
||||
public decimal? Savings { get; set; }
|
||||
public decimal? TotalCost { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Statistiche performance di un puntatore specifico
|
||||
/// </summary>
|
||||
public class BidderPerformance
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Username { get; set; } = "";
|
||||
public int TotalAuctions { get; set; }
|
||||
public int AuctionsWon { get; set; }
|
||||
public int AuctionsLost { get; set; }
|
||||
public int TotalBidsPlaced { get; set; }
|
||||
public decimal WinRate { get; set; }
|
||||
public decimal AverageBidsPerAuction { get; set; }
|
||||
public decimal AverageCompetition { get; set; } // Media puntatori concorrenti
|
||||
public bool IsAggressive { get; set; } // True se > media bids/auction
|
||||
public DateTime LastSeenAt { get; set; }
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Statistiche aggregate per prodotto
|
||||
/// </summary>
|
||||
public class ProductStatistic
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string ProductKey { get; set; } = ""; // Hash/ID prodotto
|
||||
public string ProductName { get; set; } = "";
|
||||
public int TotalAuctions { get; set; }
|
||||
public decimal AverageWinningBids { get; set; }
|
||||
public decimal AverageFinalPrice { get; set; }
|
||||
public decimal AverageResets { get; set; }
|
||||
public int MinBidsSeen { get; set; }
|
||||
public int MaxBidsSeen { get; set; }
|
||||
public int RecommendedMaxBids { get; set; } // Consiglio strategico
|
||||
public decimal RecommendedMaxPrice { get; set; }
|
||||
public string CompetitionLevel { get; set; } = "Medium"; // Low/Medium/High
|
||||
public DateTime LastUpdated { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Metriche giornaliere aggregate
|
||||
/// </summary>
|
||||
public class DailyMetric
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public int TotalBidsUsed { get; set; }
|
||||
public decimal MoneySpent { get; set; }
|
||||
public int AuctionsWon { get; set; }
|
||||
public int AuctionsLost { get; set; }
|
||||
public decimal TotalSavings { get; set; }
|
||||
public decimal? AverageLatency { get; set; }
|
||||
public decimal WinRate { get; set; }
|
||||
public decimal ROI { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Insight strategico generato dall'analisi dei dati
|
||||
/// </summary>
|
||||
public class StrategicInsight
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string InsightType { get; set; } = ""; // "BestTime", "AvoidCompetitor", "MaxBidSuggestion"
|
||||
public string? ProductKey { get; set; }
|
||||
public string RecommendedAction { get; set; } = "";
|
||||
public decimal ConfidenceLevel { get; set; } // 0-100
|
||||
public int DataPoints { get; set; } // Quante aste analizzate
|
||||
public string? Reasoning { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user