72 lines
2.0 KiB
C#
72 lines
2.0 KiB
C#
using Lux.Report.Data.DTO;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Lux.Report.Data.DbModel
|
|
{
|
|
/// <summary>
|
|
/// Classe dei report gestiti
|
|
/// </summary>
|
|
[Table("report_list")]
|
|
public class ReportModel
|
|
{
|
|
/// <summary>
|
|
/// ID del record
|
|
/// </summary>
|
|
[Key]
|
|
public int ReportID { get; set; }
|
|
|
|
/// <summary>
|
|
/// Denominazione
|
|
/// </summary>
|
|
public string Name { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Descrizione
|
|
/// </summary>
|
|
public string Description { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Valore completo Json per recupero dati, con segnaposto con [[param_01]]
|
|
/// </summary>
|
|
public string JsonDSN { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Nome del report Active tra quelli nella folder
|
|
/// </summary>
|
|
public string ActRepFileName { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Conf dei parametri per il report
|
|
/// </summary>
|
|
public string ParamConfigRaw { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Conf relative ai file report
|
|
/// </summary>
|
|
public string FileConfDataRaw { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Elenco dei parametri da gestire x il ReportTemplate
|
|
/// </summary>
|
|
[NotMapped]
|
|
public List<ParamConfigDto> ParamConfig
|
|
{
|
|
get
|
|
{
|
|
List<ParamConfigDto> answ = new();
|
|
if (!string.IsNullOrEmpty(ParamConfigRaw) && ParamConfigRaw.Length > 2)
|
|
{
|
|
answ = JsonConvert.DeserializeObject<List<ParamConfigDto>>(ParamConfigRaw) ?? new();
|
|
}
|
|
return answ;
|
|
}
|
|
set
|
|
{
|
|
string rawVal = JsonConvert.SerializeObject(value);
|
|
ParamConfigRaw = rawVal;
|
|
}
|
|
}
|
|
}
|
|
}
|