Inizio configuraizone modelli ricetta
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MP.Data.Conf
|
||||
{
|
||||
/// <summary>
|
||||
/// Configurazione blocco ricetta (Header / Rows)
|
||||
/// </summary>
|
||||
public class RecipeBlockConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Dizionario delle chiavi prefissate
|
||||
/// </summary>
|
||||
public Dictionary<string, string> FixedKeys { get; set; } = new Dictionary<string, string>();
|
||||
/// <summary>
|
||||
/// Dizionario delle chiavi Calcolate
|
||||
/// </summary>
|
||||
public Dictionary<string, string> CalcKeys { get; set; } = new Dictionary<string, string>();
|
||||
/// <summary>
|
||||
/// Dizionario delle chiavi Editabili
|
||||
/// </summary>
|
||||
public Dictionary<string, string> EditKeys { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario degli enum permessi
|
||||
/// </summary>
|
||||
public Dictionary<string, Dictionary<string, string>> EnumVal { get; set; } = new Dictionary<string, Dictionary<string, string>>();
|
||||
/// <summary>
|
||||
/// Dizionario degli enum permessi
|
||||
/// </summary>
|
||||
public Dictionary<string, CalcDetail> CalcVal { get; set; } = new Dictionary<string, CalcDetail>();
|
||||
|
||||
public class CalcDetail
|
||||
{
|
||||
public string Description { get; set; } = null!;
|
||||
public string Type { get; set; } = null!;
|
||||
public string Format { get; set; } = null!;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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; } = "";
|
||||
/// <summary>
|
||||
/// Configurazione ricetta x header
|
||||
/// </summary>
|
||||
public RecipeBlockConfig HeadConf { get; set; } = new RecipeBlockConfig();
|
||||
/// <summary>
|
||||
/// Configurazione ricetta x rows
|
||||
/// </summary>
|
||||
public RecipeBlockConfig RowsConf { get; set; } = new RecipeBlockConfig();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.9" />
|
||||
<PackageReference Include="MongoDB.Driver" Version="2.19.0" />
|
||||
<PackageReference Include="NLog" Version="5.1.1" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -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!;
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user