chore: initial commit - baseline before redesign
This commit is contained in:
158
CertReports.Syncfusion/Models/CertificateModels.cs
Normal file
158
CertReports.Syncfusion/Models/CertificateModels.cs
Normal file
@@ -0,0 +1,158 @@
|
||||
namespace CertReports.Syncfusion.Models;
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// Dati anagrafici del certificato (Sezione 1)
|
||||
// SP: rpt_Master_CFT_ISIN
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
public class CertificateInfo
|
||||
{
|
||||
// Identificazione
|
||||
public int Id { get; set; }
|
||||
public string Isin { get; set; } = string.Empty;
|
||||
public string Emittente { get; set; } = string.Empty;
|
||||
public string Nome { get; set; } = string.Empty;
|
||||
public string Categoria { get; set; } = string.Empty;
|
||||
|
||||
// Struttura
|
||||
public string Mercato { get; set; } = string.Empty;
|
||||
public string Valuta { get; set; } = string.Empty;
|
||||
public string Direzione { get; set; } = string.Empty;
|
||||
public string BasketType { get; set; } = string.Empty;
|
||||
public string BarrierType { get; set; } = string.Empty;
|
||||
public string Memory { get; set; } = string.Empty; // "SI"/"NO"/"N/A"
|
||||
public string Airbag { get; set; } = string.Empty; // "SI"/"NO"/"N/A"
|
||||
public string FrequenzaCedole { get; set; } = string.Empty; // "mensile","trimestrale",...
|
||||
|
||||
// Date (arrivano come stringhe formattate dalla SP)
|
||||
public string Scadenza { get; set; } = string.Empty;
|
||||
public string DataEmissione { get; set; } = string.Empty;
|
||||
public string DataRimborso { get; set; } = string.Empty;
|
||||
public string NextAutocallDate { get; set; } = string.Empty;
|
||||
public string LastPriceDate { get; set; } = string.Empty;
|
||||
|
||||
// Prezzi
|
||||
public string Bid { get; set; } = string.Empty;
|
||||
public string Ask { get; set; } = string.Empty;
|
||||
public decimal? NominalValue { get; set; }
|
||||
public decimal? PrezzoEmissione { get; set; }
|
||||
|
||||
// Rendimenti e protezioni (arrivano formattati dalla SP)
|
||||
public string NominalAnnualYield { get; set; } = string.Empty;
|
||||
public string CouponYield { get; set; } = string.Empty;
|
||||
public string PotentialCouponYield { get; set; } = string.Empty;
|
||||
public string MinimumYield { get; set; } = string.Empty;
|
||||
public string CapitalReturnAtMaturity { get; set; } = string.Empty;
|
||||
public string CapitalAnnualReturnAtMaturity { get; set; } = string.Empty;
|
||||
public string AutocallReturn { get; set; } = string.Empty;
|
||||
public string AutocallAnnualReturn { get; set; } = string.Empty;
|
||||
public string TriggerAutocallDistance { get; set; } = string.Empty;
|
||||
public string IRR { get; set; } = string.Empty;
|
||||
public string RendimentoTotale { get; set; } = string.Empty;
|
||||
public string RendimentoAttuale { get; set; } = string.Empty;
|
||||
|
||||
// Valori calcolati (arrivano formattati)
|
||||
public string IntrinsicValue { get; set; } = string.Empty;
|
||||
public string Premium { get; set; } = string.Empty;
|
||||
public string CapitalValue { get; set; } = string.Empty;
|
||||
public string AutocallValue { get; set; } = string.Empty;
|
||||
public string ValoreRimborso { get; set; } = string.Empty;
|
||||
public string RTS { get; set; } = string.Empty;
|
||||
public string Var95 { get; set; } = string.Empty;
|
||||
|
||||
// Protezioni (arrivano formattate)
|
||||
public string BufferKProt { get; set; } = string.Empty;
|
||||
public string BufferCPNProt { get; set; } = string.Empty;
|
||||
public string LivelloBarriera { get; set; } = string.Empty;
|
||||
|
||||
// Cedole
|
||||
public decimal? CpnPagati { get; set; }
|
||||
public decimal? CpnDaPagare { get; set; }
|
||||
public decimal? CpnInMemoria { get; set; }
|
||||
|
||||
// Vari
|
||||
public string Leva { get; set; } = string.Empty;
|
||||
public string FattoreAirbag { get; set; } = string.Empty;
|
||||
public string TriggerOneStar { get; set; } = string.Empty;
|
||||
public string Note { get; set; } = string.Empty;
|
||||
|
||||
// Sottostanti (da SP separata: rpt_Details_UL_ISIN)
|
||||
public List<Sottostante> Sottostanti { get; set; } = new();
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// Sottostanti del certificato
|
||||
// SP: rpt_Details_UL_ISIN
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
public class Sottostante
|
||||
{
|
||||
public string Nome { get; set; } = string.Empty;
|
||||
public string Strike { get; set; } = string.Empty;
|
||||
public string LastPrice { get; set; } = string.Empty;
|
||||
public string Performance { get; set; } = string.Empty;
|
||||
public string CapitalBarrier { get; set; } = string.Empty;
|
||||
public string CouponBarrier { get; set; } = string.Empty;
|
||||
public string TriggerAutocall { get; set; } = string.Empty;
|
||||
public string ULCapitalBarrierBuffer { get; set; } = string.Empty;
|
||||
public string ULCouponBarrierBuffer { get; set; } = string.Empty;
|
||||
public string ULTriggerAutocallDistance { get; set; } = string.Empty;
|
||||
public string DividendExDate { get; set; } = string.Empty;
|
||||
public string DividendPayDate { get; set; } = string.Empty;
|
||||
public string DividendAmount { get; set; } = string.Empty;
|
||||
public string DividendYield { get; set; } = string.Empty;
|
||||
public string DividendFutAmount { get; set; } = string.Empty;
|
||||
public string DividendFutYield { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// Eventi del certificato (Sezione 2)
|
||||
// SP: rpt_Events_CFT_ISIN
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
public class CertificateEvent
|
||||
{
|
||||
public string ObservationDate { get; set; } = string.Empty;
|
||||
public string ExDate { get; set; } = string.Empty;
|
||||
public string RecordDate { get; set; } = string.Empty;
|
||||
public string PaymentDate { get; set; } = string.Empty;
|
||||
public string CouponTrigger { get; set; } = string.Empty;
|
||||
public string CouponValue { get; set; } = string.Empty;
|
||||
public string Paid { get; set; } = string.Empty;
|
||||
public string Memory { get; set; } = string.Empty;
|
||||
public string AmountPaid { get; set; } = string.Empty;
|
||||
public string CapitalTrigger { get; set; } = string.Empty;
|
||||
public string CapitalValue { get; set; } = string.Empty;
|
||||
public string AutocallTrigger { get; set; } = string.Empty;
|
||||
public string AutocallValue { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// Analisi scenario / Analisi rischio (Sezione 3)
|
||||
// SP: rpt_AnalisiRischio_ISIN
|
||||
// Restituisce righe pivot con col0..col11 (tutte varchar)
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
public class ScenarioRow
|
||||
{
|
||||
/// <summary>col0: "Prezzo Sottostante", "Rimborso Certificato", "P&L % certificato"</summary>
|
||||
public string Label { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>col1..col11: valori per variazione -70%, -50%, -30%, -20%, -10%, 0%, +10%, +20%, +30%, +50%, +70%</summary>
|
||||
public List<string> Values { get; set; } = new();
|
||||
}
|
||||
|
||||
public class ScenarioAnalysis
|
||||
{
|
||||
public static readonly string[] VariationHeaders =
|
||||
{ "-90%", "-80%", "-70%", "-60%", "-50%", "-40%", "-30%", "-20%", "-10%", "0%", "+10%", "+20%", "+30%" };
|
||||
|
||||
public List<ScenarioRow> Rows { get; set; } = new();
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// Modello aggregato per generazione report
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
public class CertificateReportData
|
||||
{
|
||||
public CertificateInfo Info { get; set; } = new();
|
||||
public List<CertificateEvent> Eventi { get; set; } = new();
|
||||
public ScenarioAnalysis Scenario { get; set; } = new();
|
||||
public byte[]? ChartImage { get; set; }
|
||||
}
|
||||
53
CertReports.Syncfusion/Models/ChartModels.cs
Normal file
53
CertReports.Syncfusion/Models/ChartModels.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
namespace CertReports.Syncfusion.Models;
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
// Dati per la generazione del grafico (Sezione 4)
|
||||
// SP: FSWeb_Chart_UL, FSWeb_Chart_DailyCTF, FSWeb_Chart_DailyUL
|
||||
// ═══════════════════════════════════════════════════════════════════════
|
||||
|
||||
/// <summary>
|
||||
/// Informazioni sui sottostanti per il grafico.
|
||||
/// Da SP: FSWeb_Chart_UL
|
||||
/// </summary>
|
||||
public class ChartUnderlyingInfo
|
||||
{
|
||||
public int IDCertificates { get; set; }
|
||||
public int IDUnderlyings { get; set; }
|
||||
public DateTime StartDate { get; set; }
|
||||
public decimal Strike { get; set; }
|
||||
public decimal BarrieraCoupon { get; set; }
|
||||
public decimal BarrieraCapitale { get; set; }
|
||||
public string Sottostante { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Singolo punto dati di una serie temporale (data + performance %).
|
||||
/// Da SP: FSWeb_Chart_DailyCTF e FSWeb_Chart_DailyUL
|
||||
/// </summary>
|
||||
public class ChartDataPoint
|
||||
{
|
||||
public DateTime Date { get; set; }
|
||||
public decimal Performance { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Una serie completa da disegnare nel grafico.
|
||||
/// </summary>
|
||||
public class ChartSeries
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public List<ChartDataPoint> Points { get; set; } = new();
|
||||
public bool IsCertificate { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tutti i dati necessari per disegnare il grafico.
|
||||
/// </summary>
|
||||
public class ChartRenderData
|
||||
{
|
||||
public string Isin { get; set; } = string.Empty;
|
||||
public List<ChartSeries> Series { get; set; } = new();
|
||||
public decimal BarrieraCapitale { get; set; }
|
||||
public decimal BarrieraCoupon { get; set; }
|
||||
public decimal Strike { get; set; } = 100;
|
||||
}
|
||||
Reference in New Issue
Block a user