feat(dal): Добавлен TemplateNameGeneratorService для генерации имени шаблонов по маске в Job
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
namespace PARR.DAL.Contracts
|
||||
using PARR.BLL.Domain;
|
||||
using PARR.DAL.Extensions;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace PARR.DAL.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Настройки из БД
|
||||
@@ -33,6 +38,35 @@
|
||||
/// </summary>
|
||||
public string TemplatePrefixWithoutVariable => TemplatePrefixName.Replace("%PREFIX%-", "");
|
||||
|
||||
public string TemplateNameConstantParts { get; set; } = string.Empty;
|
||||
|
||||
[NotMapped]
|
||||
public List<TemplateNameConstantPart> TemplateNameConstantPartsList
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!string.IsNullOrEmpty(TemplateNameConstantParts))
|
||||
{
|
||||
try
|
||||
{
|
||||
return JsonSerializer.Deserialize<List<TemplateNameConstantPart>>(TemplateNameConstantParts) ?? new List<TemplateNameConstantPart>();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return new List<TemplateNameConstantPart>();
|
||||
}
|
||||
}
|
||||
|
||||
return new List<TemplateNameConstantPart>();
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value != null)
|
||||
TemplateNameConstantParts = value.ToJson() ?? string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Количество попыток выполнения задания роботом
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user