From 5d67ae3463aec8d75e8102bea77b26834ed4dd1f Mon Sep 17 00:00:00 2001 From: SmartRootsSrl Date: Wed, 27 May 2026 15:42:38 +0200 Subject: [PATCH] feat: add ChartModelsV2 (ChartUlMetadata, ChartSeriesPoint, ChartDataV2) --- .../Models/ChartModelsV2.cs | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 CertReports.Syncfusion/Models/ChartModelsV2.cs diff --git a/CertReports.Syncfusion/Models/ChartModelsV2.cs b/CertReports.Syncfusion/Models/ChartModelsV2.cs new file mode 100644 index 0000000..020919e --- /dev/null +++ b/CertReports.Syncfusion/Models/ChartModelsV2.cs @@ -0,0 +1,56 @@ +namespace CertReports.Syncfusion.Models; + +/// +/// Metadata di un sottostante (da SP cedlab_Chart_UL1). +/// Prima riga = worst-of (IsWorstOf = 1). +/// +public class ChartUlMetadata +{ + public int IDCertificates { get; set; } + public int IDUnderlyings { get; set; } + public DateTime StartDate { get; set; } + public decimal Strike { get; set; } + public decimal BarrieraCouponPerc { get; set; } + public decimal BarrieraCoupon { get; set; } + public decimal BarrieraCapitalePerc { get; set; } + public decimal BarrieraCapitale { get; set; } + public string Sottostante { get; set; } = string.Empty; + public int IsWorstOf { get; set; } + public decimal PriceWorst { get; set; } + public decimal PriceWorstPerc { get; set; } + public int NumPrezziCFT { get; set; } + public string NomeCFT { get; set; } = string.Empty; + public decimal TriggerAutocallPerc { get; set; } + public decimal AutocallValue { get; set; } +} + +/// +/// Singolo punto di una serie (da SP cedlab_Chart_AllSeriesV2). +/// IDUnderlyings = 0 → serie del certificato. +/// +public class ChartSeriesPoint +{ + public int IDUnderlyings { get; set; } + public DateTime Date { get; set; } + public decimal Performance { get; set; } +} + +/// +/// Dati completi per il grafico V2. +/// +public class ChartDataV2 +{ + public string Isin { get; set; } = string.Empty; + + /// + /// Metadata globale: prima riga di cedlab_Chart_UL1 (il worst-of). + /// Contiene NomeCFT, NumPrezziCFT, barriere, trigger — uguali per tutte le righe. + /// + public ChartUlMetadata GlobalMeta { get; set; } = new(); + + /// Tutti i sottostanti (per IsWorstOf, PriceWorst, nomi legenda). + public List Underlyings { get; set; } = new(); + + /// Tutti i punti di tutte le serie (CTF + UL), ordinati per data. + public List SeriesPoints { get; set; } = new(); +}