diff --git a/MP.Data/Conf/RecipeBlockConfig.cs b/MP.Data/Conf/RecipeBlockConfig.cs new file mode 100644 index 00000000..f95a879b --- /dev/null +++ b/MP.Data/Conf/RecipeBlockConfig.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MP.Data.Conf +{ + /// + /// Configurazione blocco ricetta (Header / Rows) + /// + public class RecipeBlockConfig + { + /// + /// Dizionario delle chiavi prefissate + /// + public Dictionary FixedKeys { get; set; } = new Dictionary(); + /// + /// Dizionario delle chiavi Calcolate + /// + public Dictionary CalcKeys { get; set; } = new Dictionary(); + /// + /// Dizionario delle chiavi Editabili + /// + public Dictionary EditKeys { get; set; } = new Dictionary(); + + /// + /// Dizionario degli enum permessi + /// + public Dictionary> EnumVal { get; set; } = new Dictionary>(); + /// + /// Dizionario degli enum permessi + /// + public Dictionary CalcVal { get; set; } = new Dictionary(); + + public class CalcDetail + { + public string Description { get; set; } = null!; + public string Type { get; set; } = null!; + public string Format { get; set; } = null!; + } + } +} diff --git a/MP.Data/Conf/RecipeConfig.cs b/MP.Data/Conf/RecipeConfig.cs new file mode 100644 index 00000000..0e19ea21 --- /dev/null +++ b/MP.Data/Conf/RecipeConfig.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MP.Data.Conf +{ + public class RecipeConfig + { + public string TemplateFile { get; set; } = ""; + /// + /// Configurazione ricetta x header + /// + public RecipeBlockConfig HeadConf { get; set; } = new RecipeBlockConfig(); + /// + /// Configurazione ricetta x rows + /// + public RecipeBlockConfig RowsConf { get; set; } = new RecipeBlockConfig(); + + } +} diff --git a/MP.Data/MP.Data.csproj b/MP.Data/MP.Data.csproj index 586f068a..806b55f7 100644 --- a/MP.Data/MP.Data.csproj +++ b/MP.Data/MP.Data.csproj @@ -25,6 +25,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive + \ No newline at end of file diff --git a/MP.Data/MgModels/RecipeModel.cs b/MP.Data/MgModels/RecipeModel.cs new file mode 100644 index 00000000..63f53ab1 --- /dev/null +++ b/MP.Data/MgModels/RecipeModel.cs @@ -0,0 +1,24 @@ +using MongoDB.Bson.Serialization.Attributes; +using MongoDB.Bson; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MP.Data.MgModels +{ + public class RecipeModel + { + [BsonId] + [BsonRepresentation(BsonType.ObjectId)] + public string? Id { get; set; } + + public int IdxPODL { get; set; } = 0; + public int IdxODL { get; set; } = 0; + public string TemplatePath { get; set; } = null!; + + public string RawRecipe { get; set; } = null!; + + } +}